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, callback, false, 0, true);
// addEventListener(Event.ENTER_FRAME, callback, false, 0, false);

<-

On 9/12/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote:


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 with the parameter set to true.
>
> Flash 9 ActionScript 3.0 Preview:
> "Does useWeakReference parameter of addEventListener() method work?"
> 
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=612&threadid=1186643&enterthread=y
>
> _
> Meinte van't Kruis wrote:
> > 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 that's it, else it wouldn't really matter if I pass
> > arguments or set variables
> > or not , because if I don't it does get deleted properly.
>
> Good luck,
> --
> Fumio Nonaka
> mailto:[EMAIL PROTECTED]
> http://www.FumioNonaka.com/
> My books
> Flash community
>
> ___
> 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
>



___
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


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 with the parameter set to true.

Flash 9 ActionScript 3.0 Preview:
"Does useWeakReference parameter of addEventListener() method work?"

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=612&threadid=1186643&enterthread=y
_
Meinte van't Kruis wrote:
> 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 that's it, else it wouldn't really matter if I pass
> arguments or set variables
> or not , because if I don't it does get deleted properly.

Good luck,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community

___
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


___
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


Re: [Flashcoders] AS3: Objects never get deleted

2006-09-11 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 addEventListener() method work?"
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=612&threadid=1186643&enterthread=y
_
Meinte van't Kruis wrote:

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 that's it, else it wouldn't really matter if I pass
arguments or set variables
or not , because if I don't it does get deleted properly.


Good luck,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community

___
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


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;

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 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 that's it, else it wouldn't really matter if I pass
> arguments or set variables
> or not , because if I don't it does get deleted properly.
>
> -Meinte
>
>
> On 9/12/06, Ian Thomas < [EMAIL PROTECTED]> wrote:
> >
> > 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 problem right
> > there...
> >
> > Ian
> > ___
> > 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
> >
>
>


___
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


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 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 that's it, else it wouldn't really matter if I pass
arguments or set variables
or not , because if I don't it does get deleted properly.

-Meinte


On 9/12/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
>
> 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 problem right
> there...
>
> Ian
> ___
> 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
>



___
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


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 that's it, else it wouldn't really matter if I pass
arguments or set variables
or not , because if I don't it does get deleted properly.

-Meinte

On 9/12/06, Ian Thomas <[EMAIL PROTECTED]> wrote:


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 problem right
there...

Ian
___
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


___
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


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 problem right
there...

Ian
___
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