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

Added removeAll to simplify reference cleanup. #1141

Merged
merged 1 commit into from
May 30, 2014
Merged

Added removeAll to simplify reference cleanup. #1141

merged 1 commit into from
May 30, 2014

Conversation

notpeter
Copy link
Contributor

Currently the simplest way to stop FlxMouseEventManager from handling events (without having to individually remove each sprite that was added) was the effective, but ugly:

    new FlxMouseEventManager();

I just got tired of seeing that call in my FlxState.destroy() functions which doesn't express at all the intent (cleanup references to objects I'm destroying). So I propose the the following instead:

    FlxMouseEventManager.removeAll()

@notpeter notpeter changed the title Added removeAll to simplify resource cleanup. Added removeAll to simplify reference cleanup. May 30, 2014
@Gama11
Copy link
Member

Gama11 commented May 30, 2014

Looks good to me! 👍

Gama11 added a commit that referenced this pull request May 30, 2014
Added removeAll to simplify reference cleanup.
@Gama11 Gama11 merged commit f40bf14 into HaxeFlixel:dev May 30, 2014
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

Successfully merging this pull request may close these issues.

2 participants