Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315261 - [Compatibility] Event handlers and part references can be leaked if the backing part was never initialized
Summary: [Compatibility] Event handlers and part references can be leaked if the backi...
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1 M4   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 13:31 EDT by Remy Suen CLA
Modified: 2010-11-26 12:47 EST (History)
0 users

See Also:


Attachments
Part reference destruction patch v1 (7.00 KB, patch)
2010-11-26 12:46 EST, Remy Suen 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-06-01 13:31:31 EDT
In order to construct a 3.x part, we need the EditorReference/ViewReference because it contains much needed information required to instantiate the part in question (such as the IConfigurationElement). We use an event handler to set the reference into the context when a part's context has been set but if the part is just closed, the part reference needs to go and so does the event handler. At the moment, this doesn't happen. When the part is reopened later, there are now two event handlers. It seems the right one gets the last "set" called on the context so it works but this is still a bug nonetheless.
Comment 1 Remy Suen CLA 2010-11-26 09:52:13 EST
Due to the changes for bug 315133, we are no longer creating multiple references/event handlers. The reference itself is still lingering if an uninitialized part is closed though.
Comment 2 Remy Suen CLA 2010-11-26 12:46:03 EST
Created attachment 183944 [details]
Part reference destruction patch v1
Comment 3 Remy Suen CLA 2010-11-26 12:47:25 EST
Fixed in CVS HEAD.