Community
Participate
Working Groups
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.
Yep, releasing the wire puller when a bundle stops is ok but most of the time too late.
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.