Re: [BLACKBOX] Is this a Files bug?

From: [at]} <Bob>
Date: Tue, 20 Nov 2012 19:50:19 +0000

----boundary-LibPST-iamunique-2072861359_-_-
Content-type: text/plain

> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Robert (SELEX GALILEO, UK)
>
> ~~The easy way is to leave file opened, let the garbage collector deals
> with ~~it, anyway, closing shared files is not nececcary.
>
> I have commented out the file.Close line in my real application, which
> seems to still work fine, and the TRAP problem has gone.
>
> Thanks.
>
> Is it generally bad practice to manually close files?
>

in general, closing a file flushes buffers to disk. So if you don't close it
and whatever medium the file is sitting on falls over, you will lose
whatever is in the unflushed buffers. In most file systems that I've worked
with you can explicitly flush the buffers.

But if you're sharing a file, and the file system knows how to deal with
sharing properly, then I would expect the file system (not the garbage
collector) to deal with all of that, rather in the way that the Rider
concept deals with things in the Oberon file system.

B


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-2072861359_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzIEFyaWFsO30NCntcZjFcZm1vZGVybiBDb3VyaWVyIE5ldzt9DQp7XGYyXGZu
aWxcZmNoYXJzZXQyIFN5bWJvbDt9DQp7XGYzXGZtb2Rlcm5cZmNoYXJzZXQwIENvdXJpZXIgTmV3
O319DQp7XGNvbG9ydGJsXHJlZDBcZ3JlZW4wXGJsdWUwO1xyZWQwXGdyZWVuMFxibHVlMjU1O30N
Clx1YzFccGFyZFxwbGFpblxkZWZ0YWIzNjAgXGYwXGZzMjAgPiBGcm9tOiBCbGFja0JveCBbbWFp
bHRvOkJMQUNLQk9YQExJU1RTLk9CRVJPTi5DSF0gT24gQmVoYWxmIE9mIENhbXBiZWxsLFxwYXIN
Cj4gUm9iZ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