I can link people to this now instead of telling them to search through forum threads for an explanation. If only more people were aware that as3 is "free" with flashdevelop...
Game developer and music producer! I made the Mine Blocks game(s).
Age 28, Male
Game Developer
Computer Scientist, 2018
Detroit
Joined on 9/9/11
I can link people to this now instead of telling them to search through forum threads for an explanation. If only more people were aware that as3 is "free" with flashdevelop...
Awesome! I'd love it if this post helps more people! :D
A good way of preventing events from running even when they're no longer useful (for example, when you forget to remove the listener directly) would be to use the "True"parameter for useWeakReference. That way it'll be GC'd if there are no other references to it (eg. the original target of the event listener is null) and it won't continue running. It's not a substitute for removing event listeners, though!
Yeah! It can help (I've done this as well), but you're totally right- you have to remove event listeners ASAP to avoid errors.
TomFulp
Good read!
Zanzlanz
Thanks Tom :D!
I really just wanted to get my thoughts down. Hopefully some other people find it helpful!