Archie Cobbs wrote:
What happens when you run this program:

    public class ThreadLeak {
        public static void main(String[] args) {
            while (true)
                new Thread();
        }
    }

I get an OutOfMemoryError.

Now I realize that Sun's JDK has the same bug:

  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4410846

Can we fix this simply by having the references from the
ThreadGroup -> Thread be via weak references?

I'm not sure why Sun hasn't done that already.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com


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

Reply via email to