-
Bug
-
Resolution: Fixed
-
Normal
-
8.6.4.1, 9.5.0.2
-
Security Level: Jimmy
Steps to Reproduce
run the attachement mvvm-memory-leak.zul
click the buttons
- create
- destroy (leak)
- check queue listeners
Current Result
the DesktopEventQueue is not Idle (means there's still a listener attached to the queue)
Repeating this causes the memory to grow
Expected Result
idle event queue (cleard up listener) after detaching the component
Debug Information
The problem happens when a component with a view model is detached after a parent container was detached
There's still an DesktopEventQueue$ListenerInfo in the _listenerInfos property of DesktopEventQueue
The listener has a reference to a BinderImpl object which still contains the original component (and subtree) and view model instances.
This prevents GC causing a memory leak for the lifetime of the desktop.
Screenshot illustrating the listener and related Binder and components remain in Memory after detaching
Workaround
detach the inner component before the container or only detaching the container fixes the problem
- relates to
-
ZK-4791 VM ID map not cleared when parent of VM is detached
- Closed