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

Bug 317068

Summary: [breadcrumb] BreadcrumbItems not disposed when editor closed
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, deepakazad, raksha.vasisht
Version: 3.6Keywords: performance
Target Milestone: 3.6.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 317283    

Description Markus Keller CLA 2010-06-16 12:19:31 EDT
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:17:14 EDT
Filed bug 317283 for Debug and bug 317282 for another leak.
Comment 2 Dani Megert CLA 2010-06-18 06:17:37 EDT
Fixed in HEAD.
Comment 3 Dani Megert CLA 2010-06-18 06:18:58 EDT
Fix is in BreadcrumbViewer.java rev. 1.28.
Comment 4 Dani Megert CLA 2010-07-12 05:26:44 EDT
Fixed in R3_6_maintenance.
Available in builds >= M20100714-0800.
Comment 5 Deepak Azad CLA 2010-08-03 15:04:36 EDT
Verified with M20100728-0800 on WinXp.
Comment 6 Raksha Vasisht CLA 2010-08-03 15:23:45 EDT
Verified for 3.7 M1 with  I20100802-1800.