From: Glenn Parker Date: 2004-12-05T01:53:01+09:00 Subject: Re: GC run at end of script execution - order in which objects are claimed? Yukihiro Matsumoto wrote: > Hi, > > In message "Re: GC run at end of script execution - order in which objects are claimed?" > on Sat, 4 Dec 2004 07:00:15 +0900, Glenn Parker writes: > > |> I'm not sure how much hackish it is. Basically all resources are > |> reclaimed by the operating system at the process termination. If you > |> have something that can not be reclaimed automatically by the OS, > |> you can not expect GC to handle it automagically either. > | > |A counter-example would be creating a named pipe, or a shared memory > |segment, or a large tmp file that should be removed at program exit. If > |an application relies on finalizers or other semi-non-deterministic > |tricks to accomplish the cleanup, then it could easily leave system > |resources allocated. IMHO, such an application is flawed, since there > |are much better ways to guarantee cleanup at the end of an application. > | It's a matter of setting expectations. > > I think we are saying same thing. My "something that can not be > reclaimed automatically" is your "a named pipe, or a shared memory > segment, or a large tmp file that should be removed at program exit", > right? Yes, we are saying the same thing. -- Glenn Parker | glenn.parker-AT-comcast.net |