Re: [Flashcoders] some dying logic ...

2008-04-03 Thread Meinte van't Kruis
thanks,cool thread. Now I have to drink some coffee, become less confused and let it sink in :) On Wed, Apr 2, 2008 at 9:15 PM, EECOLOR <[EMAIL PROTECTED]> wrote: > >granted that the eventListener was added with a weak reference > > This seems to be one of the biggest mis-understandings these da

Re: [Flashcoders] some dying logic ...

2008-04-02 Thread EECOLOR
>granted that the eventListener was added with a weak reference This seems to be one of the biggest mis-understandings these days. The listener does *not*add a reference to the object that you are listening too. For extensive discussion and proof of this issue you can read the following thread:

Re: [Flashcoders] some dying logic ...

2008-04-02 Thread Cedric Muller
this is how the eventListener is added: this.basicNews.addEventListener(RepeaterEvent.CLICK, this.onNewsClicked, false, 0, true); granted that the eventListener was added with a weak reference On Wed, Apr 2, 2008 at 3:35 PM, EECOLOR <[EMAIL PROTECTED]> wrote: *if (this.basicNews != null)

Re: [Flashcoders] some dying logic ...

2008-04-02 Thread Meinte van't Kruis
granted that the eventListener was added with a weak reference On Wed, Apr 2, 2008 at 3:35 PM, EECOLOR <[EMAIL PROTECTED]> wrote: > *if (this.basicNews != null) { >this.basicNews.removeEventListener(RepeaterEvent.CLICK, > this.onNewsClicked); > this.removeChild(this.basicNews); > this.bas

Re: [Flashcoders] some dying logic ...

2008-04-02 Thread EECOLOR
*if (this.basicNews != null) { this.basicNews.removeEventListener(RepeaterEvent.CLICK, this.onNewsClicked); this.removeChild(this.basicNews); this.basicNews.die(); this.basicNews = null; }* In the above code I do not see why you would need any more then the following lines: *basicNews

[Flashcoders] some dying logic ...

2008-04-01 Thread Cedric Muller
Hello, I did develop a global process, in which my customized objects do have a 'die' method which is called in the end of an object's life in order to clean *everything* (like removing internal movieclips, sprites, listeners, timers, ..) this is what I came up with: the following block c