Stuart Ballard wrote:
> On Fri, 10 Dec 2004 14:47:54 +0100, Jeroen Frijters 
> <[EMAIL PROTECTED]> wrote:
> > I didn't like it either and after thinking a little more about it I
> > dislike it even more, because subclasses that override finalize and
> > forget to call the base class (in my experience this is 
> *highly* likely)
> > would cause the leak anyway.
> 
> Would it be possible to keep a list of weak references and use one of
> those magic queue things that notifies you when your objects become
> unreachable?

Yeah, we could use a phantom reference to clean up. This is better than
a finalize method, but it isn't cheap either. An additional downside of
them is that IKVM doesn't really support them :-(

The .NET weak references are very weak compared to Java (pun intended).

I'm currently leaning towards not cleaning up.

Regards,
Jeroen


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to