Closed laeubi closed 1 month ago
The following Map in LifecycleManager https://github.com/eclipse/sisu.inject/blob/6fa4bc1a635f1e8ec91e438bcb059f414d713f70/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/LifecycleManager.java#L31-L32
Map
LifecycleManager
prevents no longer used classes (and more important their classloaders) from being garbage collected, see for example
This should use some strategies like WeakHashMap so if the class is only referenced from this component it could still be freed.
WeakHashMap
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=581407
Thanks for moving this into the right place, @laeubi! 🙇
The following
Map
inLifecycleManager
https://github.com/eclipse/sisu.inject/blob/6fa4bc1a635f1e8ec91e438bcb059f414d713f70/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/LifecycleManager.java#L31-L32prevents no longer used classes (and more important their classloaders) from being garbage collected, see for example
This should use some strategies like
WeakHashMap
so if the class is only referenced from this component it could still be freed.See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=581407