Community
Participate
Working Groups
In 03/04 build Import all projects as binary projects Open Java Perspective Expand org.eclipse.jdt.internal.corext Edit Assert.java Every time you open/close this file aprox 100k of java objects are leaked I'll update this defect report as I find more information.
Added Nick as the leak may also be in the platform-ui code. Small correction to the steps: binary projects for org.apache.* source projects for the rest
*** Bug 33922 has been marked as a duplicate of this bug. ***
Adam, can you try to reproduce this
Kai,Adam The Platform UI team has fixed a leak in IActionDelegate2. See this defect for details: http://bugs.eclipse.org/bugs/show_bug.cgi?id=34010
JavaModelOperation has a static reference to PerThreadObject and stores there every reconcile thread that ever existed, even after its death reconcile threads have references to CompilationUnitEditors and from there everything is leaked maybe jcore should remove reconcile threads from the map as soon as they die asking jcore for comment
this is a source of leaks in other places as well - it stores all ModelContextThreads too
Thanks for investigating Adam. When poping the last operation (i.e. the top level operation), we should remove the reference to the current thread. Proposed fix on JavaModelOperation: /* * Removes the last pushed operation from the stack of running operations. * Returns the poped operation or null if the stack was empty. */ protected JavaModelOperation popOperation() { ArrayList stack = getCurrentOperationStack(); int size = stack.size(); if (size > 0) { if (size == 1) { // top level operation -> free memory (see http://bugs.eclipse.org/bugs/show_bug.cgi?id=33927) operationStacks.setCurrent(null); } return (JavaModelOperation)stack.remove(size-1); } else { return null; } }
Approved change suggestion. Integrated for RC3.
Verified.