Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317283

Summary: [breadcrumb] BreadcrumbItems not disposed when editor closed
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: DebugAssignee: Pawel Piech <pawel.1.piech>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: darin.eclipse, deepakazad, markus.kell.r, pawel.1.piech
Version: 3.6Keywords: performance
Target Milestone: 3.6.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 317068    
Bug Blocks:    
Attachments:
Description Flags
Fix (needs to be adjusted for 3.6.1) none

Description Dani Megert CLA 2010-06-18 06:15:16 EDT
+++ This bug was initially created as a clone of Bug #317068 +++

HEAD

BreadcrumbItems are leaked (not disposed) when a Java editor is closed. Found that by adding the following to org.eclipse.swt.widgets.Widget:

// --- Find undisposed widgets: ---
private Error creation;
{
    creation = new Error("Widget not disposed before finalized! Created at:");
}
protected void finalize() throws Throwable {
    if (!isDisposed()) {
        creation.printStackTrace();
    }
}
//--- End find undisposed widgets. ---


From looking at the code, I think there are more leaks in the breadcrumb: BreadcrumbViewer does not extend handleDispose(), never disposes of the fToolTipLabelProvider (which installs global listeners), etc.
Comment 1 Dani Megert CLA 2010-06-18 06:15:44 EDT
No issue from label provider but items need to be disposed.
Comment 2 Dani Megert CLA 2010-06-18 06:16:32 EDT
Created attachment 172206 [details]
Fix (needs to be adjusted for 3.6.1)
Comment 3 Pawel Piech CLA 2010-07-09 18:31:00 EDT
I applied the fix.  Thank You!
Comment 4 Pawel Piech CLA 2010-07-09 18:41:58 EDT
Marking verified.