-
Bug
-
Resolution: Fixed
-
Normal
-
9.5.0.2
-
Security Level: Jimmy
Steps to Reproduce
- Run the code
<zk> <div id="root"> <div id="container"> <radiogroup> <radio label="YES"/> <radio label="NO"/> </radiogroup> </div> </div> <button label="detach container" onClick="container.detach();"/> </zk>
- click the button
- perform GC / take a heap dump
- check the live objects (e.g. in VisualVM)
Current Result
The <radio> component remains in memory even though it's been detached from the page
Expected Result
All detached components should be eligible for garbage collection.
Debug Information
from the heap dump it seems a callback from at the root div keeps a reference to the radio
the callback is added here:
https://github.com/zkoss/zk/blob/v9.5.0.2/zul/src/org/zkoss/zul/Radio.java#L289
Workaround
- relates to
-
ZK-3818 Radiogroup getSelectedItem() cause exception if radio are in subcomponents
- Closed