Bug 283255 - GradientBackgroundListener leaks controls
Summary: GradientBackgroundListener leaks controls
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.5 RC1   Edit
Assignee: Robert Roth CLA
QA Contact: Brian de Alwis CLA
URL:
Whiteboard:
Keywords: greatfix
Depends on:
Blocks: 262787
  Show dependency tree
 
Reported: 2009-07-12 17:46 EDT by Benjamin Muskalla CLA
Modified: 2015-05-04 13:51 EDT (History)
5 users (show)

See Also:
Lars.Vogel: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2009-07-12 17:46:21 EDT
Currently all widgets that need a GradientBackgroundListener are stored in a static map in GradientBackgroundListener. This has two major drawbacks:
a) not really multi-user aware
b) the map never releases any widget which can be quite memory-consuming.

I think in the first place we should at least add a dispose listener to the widget to remove it from the map again when it is disposed.
Comment 1 Remy Suen CLA 2009-07-12 18:16:09 EDT
Somewhat related to bug 278638 and bug 279349.
Comment 2 Eclipse Genie CLA 2015-05-03 02:48:25 EDT
New Gerrit change created: https://git.eclipse.org/r/46983
Comment 3 Brian de Alwis CLA 2015-05-04 13:02:36 EDT
Dirk, would you mind reviewing Robert's patch?
Comment 4 Brian de Alwis CLA 2015-05-04 13:03:35 EDT
Moving to Platform UI since CSS graduated from e4.  We could consider storing the handlers directly on the control's data and avoid the static map entirely.
Comment 6 Brian de Alwis CLA 2015-05-04 13:51:23 EDT
Thx Robert for the fix, and Lars for the quick review!  Fixed for RC1.