[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory leak in java.lang.Thread ?
From: |
Archie Cobbs |
Subject: |
Re: Memory leak in java.lang.Thread ? |
Date: |
Wed, 08 Dec 2004 13:58:18 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041129 |
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.
*
- RE: Memory leak in java.lang.Thread ?, (continued)
- RE: Memory leak in java.lang.Thread ?, David Holmes, 2004/12/09
- RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/08
- RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/08
- RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/08
- RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/08
- RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/10
- RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/10
RE: Memory leak in java.lang.Thread ?, Jeroen Frijters, 2004/12/10