Re: A non-sucking garbage collector
"Mark Hahn" <[email protected]> Tue, 27 Jul 2004 16:09:42 -0700
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Mark Hahn wrote: >> How do you tell if an object reference "ever left the frame?" >> Wouldn't they almost always leave the frame? If you call >> obj.foo(), the method "foo" sees a reference to its self >> pointer and could store it away anywhere. > > You may very well be right. I'll investigate this in detail before I > give the talk. Actually this feature is in the Wiki as a future > feature, not a > 1.0. AARRGGHH. Not only is the idea of an add-on deterministic finalization feature unworkable, but I don't see how I can do any kind of finalization on a copying collector, deterministic or not. The copying collector only visits reachable objects and then leaves all others behind as trash. Since they are never visited they will never be called to be finalized. I don't even think it is possible to find those objects since they aren't kept in any kind of linked structure. Back to the drawing board again. I really do hate finalization. I have the other callback mechansim for when something deletes an object, but something has to specifically do a delete so it wouldn't help here.