Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362801 - PropertySheet never releases member "currentPart" - causes memory leak
Summary: PropertySheet never releases member "currentPart" - causes memory leak
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.8 M4   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 10:50 EDT by Andre Bergmann CLA
Modified: 2011-11-18 13:11 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Bergmann CLA 2011-11-03 10:50:29 EDT
Build Identifier: org.eclipse.ui.views (3.5.1.M20110202-0800)

The component org.eclipse.ui.views.properties.PropertySheet always keeps a refrence to the last part in its member "currentPart". Thus, even if all editors are closed, a reference is still kept and the gc cannot clean up the edior element (which is quite big in my case). 

Eclipse Memory Analyzer (MAT) shows, that "currentPart" references the editor instance, even if the editor is closed. 

My suggestion would be, to reset the member "currentPart" in partClosed(...) method if the closed part.equals(currentPart). 

Reproducible: Always
Comment 1 Dani Megert CLA 2011-11-04 07:10:53 EDT
Fixed in master: ecf1d9169f92decb1da00e36ba20bb6561887169
Comment 2 Dani Megert CLA 2011-11-17 10:08:09 EST
(In reply to comment #1)
> Fixed in master: ecf1d9169f92decb1da00e36ba20bb6561887169
Actually that's the R3_development commit.

'master' fix is: a4f48217d6c3eecbc2eb99b01f3637096c179f69
Comment 3 Andre Bergmann CLA 2011-11-18 13:07:03 EST
(In reply to comment #2)
> (In reply to comment #1)
> > Fixed in master: ecf1d9169f92decb1da00e36ba20bb6561887169
> Actually that's the R3_development commit.
> 
> 'master' fix is: a4f48217d6c3eecbc2eb99b01f3637096c179f69

sorry, but what does that mean?
Comment 4 Remy Suen CLA 2011-11-18 13:10:43 EST
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Fixed in master: ecf1d9169f92decb1da00e36ba20bb6561887169
> > Actually that's the R3_development commit.
> > 
> > 'master' fix is: a4f48217d6c3eecbc2eb99b01f3637096c179f69
> 
> sorry, but what does that mean?

The fix was only in the Eclipse 3.x stream. Now it is in both the 3.x and 4.x stream.
Comment 5 Paul Webster CLA 2011-11-18 13:11:58 EST
(In reply to comment #3)
> > 'master' fix is: a4f48217d6c3eecbc2eb99b01f3637096c179f69
> 
> sorry, but what does that mean?

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=a4f48217d6c3eecbc2eb99b01f3637096c179f69

That's the commit that fixed it.
PW