Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiz teardown does not remove SwizEvent.CREATED listener #34

Open
bclinkinbeard opened this issue Dec 19, 2011 · 0 comments
Open

Swiz teardown does not remove SwizEvent.CREATED listener #34

bclinkinbeard opened this issue Dec 19, 2011 · 0 comments

Comments

@bclinkinbeard
Copy link
Contributor

Migrated from SWIZ-67

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 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant