On Thu, Feb 15, 2001 at 12:11:27AM +0000, Simon Cozens wrote: > > Using object lifetime to control state is almost never a good idea, > > even if you have deterministic finalization. > > A deterministic finalization means we shouldn't need to force programmers > to have good ideas. Make it easy, remember? :) Actually, no. Even if you have a deterministic finalizer, you still want to separate resource allocation from object lifetime. What it means is that, in certain circumstances, you can imply the deallocation step, which does make things easy. You don't want GCing the filehandle object to be the only way to close a filehandle. (Which is what you often get when you conflate object finalization and object resource ownership.) Having it be A way to close handles is fine, and guaranteeing when finalization occurs is frequently handy. - Damien filehandle obj
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Dan Sugalski
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/) Branden
- Re: Garbage collection (was Re: JWZ on s/Java/Perl/... abigail
- Re: Garbage collection (was Re: JWZ on s/Java/P... Simon Cozens
- Re: Garbage collection (was Re: JWZ on s/Ja... Dan Sugalski
- Re: Garbage collection (was Re: JWZ on s/Ja... Damien Neil
- Re: Garbage collection (was Re: JWZ on... Simon Cozens
- Re: Garbage collection (was Re: JWZ on... Damien Neil
- Re: Garbage collection (was Re: JWZ on... Hong Zhang
- Re: Garbage collection (was Re: JWZ on... Branden
- Re: Garbage collection (was Re: JWZ on... Tim Bunce
- Re: Garbage collection (was Re: JWZ on... Branden
- Re: Garbage collection (was Re: JWZ on... Uri Guttman
- Re: Garbage collection (was Re: JWZ on... Tim Bunce
- Re: Garbage collection (was Re: JWZ on... Uri Guttman
- Re: Garbage collection (was Re: JWZ on... Branden
- Re: Garbage collection (was Re: JWZ on... Damien Neil
- Re: Garbage collection (was Re: JWZ on... Branden