Summary: | Leak in Java Editor | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kevin Haaland <Kevin_Haaland> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | CC: | akiezun, n.a.edgar |
Version: | 2.1 | ||
Target Milestone: | 2.1 RC3 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Kevin Haaland
2003-03-05 18:04:10 EST
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. |