Chris Pickett wrote: >>> Perhaps we should add a comment to the Javadoc for Thread.java >>> like "instances of Thread are not garbage collected until either >>> they run and terminate or their ThreadGroup and all contained >>> Threads are no longer referenced." >> >> Agreed. I'm (almost) always in favor of compatibility with Sun, so >> adding a comment would be a good idea. > > Just out of curiousity, is this the only example you can think of > (besides creating threads in other ways) that creates a hidden reference > to a new object?
I don't know of any other examples like this .. i.e., where the spec actually requires a memory leak, rather than just your regular run-of-the-mill memory leak. An example of the latter is Sun's implementation of XMLEncoder, which secretly stores references to your encooded objects in static variables. It's also not thread safe (this is in 1.4.x). -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com * Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. * _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/classpath

