[self-interest] simplicity

Milan Vandrovec milan_va at seznam.cz
Thu Jul 1 12:09:21 UTC 2004


> I wonder what makes most resources unlike memory?
> If anyone knows the answer please chime in.

I think it's because you are leaving the Self environment and using
Windows HANDLEs and such. There should be a wrapper for HANDLE or FILE*
so that it does not matter when the file is closed.

The problem appears clearly when you want to open a file just after
closing it elsewhere.

If it was a Self object, it could never be finalized as that only
happens on file deletion. You would call some "lockReadWrite: Self" and
"unlockWrite: Self" methods instead of creating and finalizing some file

However, since it's a file on a drive that exists outside the Self
environment, there is a problem that the underlying OS tries to give you
another handle instead of reusing the old one.

I hope someone finds something useful in my thoughts...

  Milan Vandrovec

More information about the Self-interest mailing list