States- and event handler-related bug in Flex SDK 4.0
01:07 PM
There is a bug in Flex SDK 4.0 which prevents MXML components with event handler with state modifier from being garbage collected, which creates memory leaks.
So, don’t use state event handlers in your production code, like this:
<s:Button label="Test" click.main="trace('click!')" />
Use simple event handlers instead with if clause:
<s:Button label="Test" click="if(currentState == 'main') trace('click!')" />
I’ve reported the bug to Adobe, please vote for it to gain attention: https://bugs.adobe.com/jira/browse/SDK-26185