AS3: Weakly Referenced Listeners

/ Published in: ActionScript 3
Save to your folder(s)

GSkinner show's how to set up a weak listener that way Garbage Collection can come around and recollect some memory when it needs to.

Here's another resource that gives a more in depth look:

Copy this code and paste it in your HTML
  1. // params: eventName, listener, capturePhase, priority, useWeakReference
  2. someObj.addEventListener("eventName",myFunct,false,0,true);


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.