« Singleton vs Static | Main | Podcast-o-rama »

Flexities

As I find things out about Flex, I'm going to start posting them to share. One of the things i discovered by looking at Jesse Warden's drawing pad example is this wicked line of code :"hasEventListener(MouseEvent.MOUSE_MOVE) == true".

Thats awesome, you can actually check for a listener for specific event. You don't know how many times oddness or memory leakage due to people adding event listeners and never removing them when they are no longer needed OR when the item no longer exists. A prime example is adding a movieclip via attachMovie, adding it as a listener, removing the movieclip, but NOT removing the listener. So that item still exists in the _listeners array - even tho itself doesn't exist. Correct me if I am wrong, but I am sure thats the scenerio.

Posted by bitch at April 14, 2006 08:50 PM

Comments




Remember Me?