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

Bug 312786

Summary: New Connection Profile wizard leaks ~15 database icons
Product: [Tools] Data Tools Reporter: Karen Butzke <karenfbutzke>
Component: ConnectivityAssignee: Brian Fitzpatrick <bfitzpat>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.8   
Target Milestone: 1.8   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch against HEAD - disposes images none

Description Karen Butzke CLA 2010-05-13 09:55:06 EDT
Created attachment 168380 [details]
proposed patch against HEAD - disposes images

The New Connection Profile wizard does not dispose of the icons created by each of the ProfileWizardProviders.  It leaks those icons after the wizard is opened once. It caches them so that they don't keep leaking everytime the wizard is opened, but it could do better and dispose of those icons.  Then if you only ever open that wizard once you won't have those ~15 images hanging around for the remainder of your eclipse session contributing to 'no more handles' crashes.

I have attached a patch that caches these icons in the TableLabelProvider and disposes of them when the wizard is closed.  A further change you could make is to remove IProfileWizardProvider.getCachedIcon() since now it is not used anymore. This is an API change, so I did not make it in the hopes that this patch will make it into a 1.8 release candidate. Maybe deprecate that api?
Comment 1 Brian Fitzpatrick CLA 2010-05-18 11:05:24 EDT
Thanks for the patch!
Comment 2 Brian Fitzpatrick CLA 2010-05-18 11:10:18 EDT
Delivered to o.e.d.connectivity.ui as tag v201005182309