-
Notifications
You must be signed in to change notification settings - Fork 435
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
Destroyed FlxFlicker error #2083
Comments
Yeah, you shouldn't expect that an object is still usable after you call |
I can make a PR, but what's better: adding stop to destroy or making stop public, or both? Destroy doesn't currently stop the timer from executing more callbacks, and it doesn't free up the object map reference. |
Why do you need |
So you don't have to go through the static object map to stop the FlxFlicker if you already have a reference to it. Since |
Right.. I'm not really a huge fan of this API, it probably shouldn't be in core Flixel to begin with... But I don't really see any harm in making |
|
I wouldn't worry about it then. |
Manually
destroy
ing aFlxFlicker
and making a new one on the same object causes an error because the_boundObjects
reference isn't removed.timer
is null, andstopFlicker
viaForceRestart
doesn't check for null.This is solved if
destroy
callsstop
and ifstop
is given null checks. Ifdestroy
isn't intended to be used in this way,stop
should be publicly accessible so a user can stop the flicker via the flicker itself and not solely via the object being flickered.Latest dev
The text was updated successfully, but these errors were encountered: