Does the useWeakReference parameter of
EventDispatcher.addEventListener() method in ActionScript 3.0 work?  I
referred the following documents:

"ActionScript 3.0 Language Reference"
http://livedocs.macromedia.com/labs/as3preview/langref/flash/events/EventDispatcher.html#addEventListener()
"AS3: Weakly Referenced Listeners"
http://www.gskinner.com/blog/archives/2006/07/as3_weakly_refe.html

Then tried the script as follows:

// frame action
import flash.events.Event;
addEventListener(EVENT.ENTER_FRAME,
function (eventObject:Event):void {
        trace(eventObject);;
},
false, 0, true);  // sets useWeakReference to true

But the anonymous listener function does not seems to be garbage
collected.  And it continues to be called on every enterFrame event.  I
am using Flash Professional 9 ActionScript 3.0 Preview.

How the useWeakReference parameter works?  Any suggestion and advice
would be very appreciated.

Regards,
-- 
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books<http://www.FumioNonaka.com/Books/index.html>
Flash community<http://F-site.org/>

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to