wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

Memory leak in AccordionBase #226

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
AccordionBase adds a non-weak event listener on the systemManager and never
removes it. This means the systemManager will always keep a reference to
the accordion, and it can never be garbage collected.

The fix is very simple: make it a weak listener by replacing this line:
systemManager.addEventListener(Event.REMOVED, systemManager_removedHandler);
with:
systemManager.addEventListener(Event.REMOVED, systemManager_removedHandler,
false, 0, true);

Original issue reported on code.google.com by coekie on 3 Jun 2009 at 8:19