swiz teardown does not remove SwizEvent.CREATED listener
Description
When teardown is called on a swiz instance (either through SwizManager or Swiz.tearDown), the swiz instance is pinned in memory because an event listener is not removed. If a new swiz instance is created after, the new swiz instance will use the torn down one as the parent.
Swiz.as line 414: dispatcher.addEventListener( SwizEvent.CREATED, handleSwizCreatedEvent );
A possible solution is to add to the teardown method: dispatcher.removeEventListener( SwizEvent.CREATED, handleSwizCreatedEvent );
Environment
Win 7, Flex 4.5.1 SDK
Activity
Show:
Ben Clinkinbeard December 19, 2011 at 7:08 PM
Moved to GitHub Issues.
Incomplete
Pinned fields
Click on the next to a field label to start pinning.
When teardown is called on a swiz instance (either through SwizManager or Swiz.tearDown), the swiz instance is pinned in memory because an event listener is not removed. If a new swiz instance is created after, the new swiz instance will use the torn down one as the parent.
Swiz.as line 414: dispatcher.addEventListener( SwizEvent.CREATED, handleSwizCreatedEvent );
A possible solution is to add to the teardown method:
dispatcher.removeEventListener( SwizEvent.CREATED, handleSwizCreatedEvent );