Garbage Collector, weak references and all that jazz
Last time i was working on a project, already almost done by another developer. When looking at the code, i was surprised to see all the call to the addEventListener function made like that:
_myObject.addEventListener(Event.AN_EVENT, myEventHandler, false, 0, true);
I knew that the addEventListener function has 3 optional parameters, but i had just never taken the time to look at them. After seing that i though that it would be a good idea to check what exactly were those parameters.
Here is the exact signature of the addEventListener function from the Adobe LiveDocs:
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Ok so the three optional parameters are the useCapture flag, the priority and the useWeakReference… Read the rest of this entry »