Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317283 - [breadcrumb] BreadcrumbItems not disposed when editor closed
Summary: [breadcrumb] BreadcrumbItems not disposed when editor closed
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.6.1   Edit
Assignee: Pawel Piech CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on: 317068
Blocks:
  Show dependency tree
 
Reported: 2010-06-18 06:15 EDT by Dani Megert CLA
Modified: 2010-07-09 18:41 EDT (History)
4 users (show)

See Also:


Attachments
Fix (needs to be adjusted for 3.6.1) (5.96 KB, patch)
2010-06-18 06:16 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.