[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Memory leak in java.lang.Thread ?

From: David Holmes
Subject: RE: Memory leak in java.lang.Thread ?
Date: Sat, 11 Dec 2004 10:32:16 +1000

> 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?

A weak-reference (whichever kind is needed - I don't recall details) would
solve the problem and be subclass safe, but would involve even more overhead
that a finalizer. Keeping a notStartedCount is trivial, but keeping a set of
references requires array management etc. I don't think it is worth it.

BTW in discussing with other JSR-166 members the consensus is that the
ThreadGroup methods should be specified in terms of the new ThreadState

David Holmes

reply via email to

[Prev in Thread] Current Thread [Next in Thread]