Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330398 - RSE leaks SWT resources
Summary: RSE leaks SWT resources
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.3 M7   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-16 14:44 EST by Remy Suen CLA
Modified: 2011-03-16 12:46 EDT (History)
0 users

See Also:


Attachments
patch to dispose of Clipboard and Color resources (32.38 KB, patch)
2011-03-16 12:44 EDT, David McKnight CLA
no flags Details | Diff

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