Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Apache Flex 4.8 (parity release)
-
None
-
None
Description
In the development branch (though I believe this is an issue in most of all versions), PollingChannel.as:778, the code adds an event listener that is never released.
This results in a leak of PollCommandMessageResponder objects and associated memory.
Suggest that line 778 in the constructor for the private class PollCommandMessageResponder:
channel.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, channelPropertyChangeHandler);
be changed to:
channel.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, channelPropertyChangeHandler, false, 0, true);
To make the event listener use weak references, or refactor PollingChannel.as to remove the event listener before disposing of a PollCommandMessageResponder.