Re: [Flashcoders] AS3: Objects never get deleted

2006-09-12 Thread Fumio Nonaka
The useWeakReference parameter of EventDispatcher.addEventListener() does not seem to work. Also, the method has a bug, which is that the event listner function cannot be deleted with the parameter set to true. Flash 9 ActionScript 3.0 Preview: Does useWeakReference parameter of

Re: [Flashcoders] AS3: Objects never get deleted

2006-09-12 Thread Meinte van't Kruis
ok, thats nice to know :) any known solutions to this? -Meinte On 9/12/06, Fumio Nonaka [EMAIL PROTECTED] wrote: The useWeakReference parameter of EventDispatcher.addEventListener() does not seem to work. Also, the method has a bug, which is that the event listner function cannot be deleted

Re: [Flashcoders] AS3: Objects never get deleted

2006-09-12 Thread Meinte van't Kruis
pardon me, it seems to be described in the thread. - function callback(eventObject:Event):void { removeEventListener(Event.ENTER_FRAME, callback, false); // callback = null; trace([this, callback]); } // callback.self = callback; addEventListener(Event.ENTER_FRAME,

[Flashcoders] AS3: Objects never get deleted

2006-09-11 Thread Meinte van't Kruis
Hi Folks, I've read up on grant skinners' articles about the garbage collector and how the new memory management gets done in as3. I've build some test cases to see how the new virtual machine handles stuff, and came upon some weirdness. I have two classes, GCTester and GCTarget. GCTester

Re: [Flashcoders] AS3: Objects never get deleted

2006-09-11 Thread Ian Thomas
On 9/11/06, Meinte van't Kruis [EMAIL PROTECTED] wrote: GCTarget only listens to an enterframe event and traces something so I know wether it's still alive or not. So you're saying you've passed GCTarget as a target of a listener? Did you use weak references? Because if not, there's your

Re: [Flashcoders] AS3: Objects never get deleted

2006-09-11 Thread Meinte van't Kruis
thanks for replying, I am using weak references for the listener, here's the code (within GCTarget): this.addEventListener(Event.ENTER_FRAME,onFrame,false,0,true); } private function onFrame(e:Event):void{ trace(A); } So I don't think

Re: [Flashcoders] AS3: Objects never get deleted

2006-09-11 Thread Meinte van't Kruis
it DOES however get deleted when setting the useCapture flag to true; this.addEventListener(Event.ENTER_FRAME,onFrame,true,0,true); Isn't this weird? Why would this be? -Meinte On 9/12/06, Meinte van't Kruis [EMAIL PROTECTED] wrote: thanks for replying, I am using weak references for

Re: [Flashcoders] AS3: Objects never get deleted

2006-09-11 Thread Meinte van't Kruis
nevermind bout the onCapture bit, probably bubbles the event instead of firing the local onFrame function.. On 9/12/06, Meinte van't Kruis [EMAIL PROTECTED] wrote: it DOES however get deleted when setting the useCapture flag to true;