We Recommend

Essential ActionScript 3.0 Essential ActionScript 3.0
The book focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.


Posted By

chrisaiv on 02/28/08


Tagged


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

gismo
palmerama
outbox


AS3: Weakly Referenced Listeners


Published in: ActionScript 3 


URL: http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html

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:
http://createandgrow.com/blog/?p=6


  1. // params: eventName, listener, capturePhase, priority, useWeakReference
  2. someObj.addEventListener("eventName",myFunct,false,0,true);

Report this snippet 

You need to login to post a comment.