Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359045 - WirePuller memory leak
Summary: WirePuller memory leak
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: Core (show other bugs)
Version: 4.0.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Stefan Liebig CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 07:55 EDT by Jürgen Becker CLA
Modified: 2012-01-04 02:43 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Becker CLA 2011-09-27 07:55:19 EDT
Every WirePuller instance holds a reference to a bean (e.g. Sub/ModuleController) and every WirePuller registers a BundleStoppingListener with the platform, to be informed if the bundle containing the bean class is stopped.
When the bean is e.g. disposed/stopped the WirePuller does not know about it and a reference to the bean is kept, even if it is no longer used. This causes memory leaks.

The BundleStoppingListener, and thus the WirePuller, must be deregistered if the bean is no longer in use, to free the resources.
Comment 1 Stefan Liebig CLA 2011-09-27 08:07:56 EDT
Yep, releasing the wire puller when a bundle stops is ok but most of the time too late.
Comment 2 Stefan Liebig CLA 2012-01-04 02:43:56 EST
Has been fixed 3 months ago by keeping a weak reference (WeakRef) for the wired bean. When the bean gets garbage collected the wire puller will be stopped.