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

Bug 330398

Summary: RSE leaks SWT resources
Product: [Tools] Target Management Reporter: Remy Suen <remy.suen>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: major    
Priority: P3    
Version: 3.3   
Target Milestone: 3.3 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch to dispose of Clipboard and Color resources none

Description Remy Suen CLA 2010-11-16 14:44:37 EST
org.eclipse.rse.ui.internal.model.SystemRegistryUI
Creates a Clipboard but never disposes it.

org.eclipse.rse.ui.filters.SystemChangeFilterPane
Creates a Clipboard but never disposes it.

org.eclipse.rse.ui.widgets.SystemCollapsableSection
Creates a static Color but never disposes it.
Comment 1 Martin Oberhuber CLA 2010-11-17 08:24:48 EST
Thanks for the report, we'll have a look!

How did you find out? 
Is this a procedure we could add to our standard testing?
Why do you think the issue is major (so far, nobody noticed in almost 7 years)?
Comment 2 Remy Suen CLA 2010-11-17 08:31:25 EST
(In reply to comment #1)
> How did you find out?

By using the Java search for constructor references and then checking the source code to see if the resource is disposed anywhere.

> Is this a procedure we could add to our standard testing?

Not really because this is a completely manual process. It's just something I like to do when I happen to have some project's UI code checked out in my workspace.

> Why do you think the issue is major (so far, nobody noticed in almost 7 years)?

I consider resource leaks to be a major problem because you may eventually run out of handles and crash. However, others may feel otherwise. Feel free to tweak the severity as you wish, that field doesn't really have any meaning to me (if I'm not the assignee of the bug ;)).;)
Comment 3 Martin Oberhuber CLA 2010-11-25 12:31:47 EST
Dave, could you have a look at this?
Comment 4 David McKnight CLA 2011-03-16 12:44:48 EDT
Created attachment 191314 [details]
patch to dispose of Clipboard and Color resources
Comment 5 David McKnight CLA 2011-03-16 12:46:13 EDT
I've committed the change to cvs.