My point is that there is no guarantee, so your code might have to
handle situations where a callback like updateDisplayList happens after
it is off the display list.  If a component is invalidated, the
LayoutManager has a handle to it and there's isn't any good way to force
it to let go.  validateNow() might work, but no guarantees.  Once
validated, it will release its reference and eventually the object
should go away.

 

I suppose you could add some way of making sure things don't get
invalidated in the same frame as they get released as well.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of David Ham
Sent: Friday, May 02, 2008 8:00 PM
To: [email protected]
Subject: [flexcoders] Re: States, Garbage Collection, Event
Listeners--all FUBAR

 

> GC only happens on new allocations, so you can never count on things
> being cleaned up immediately, just eventually, and you have to code
for
> that.
> I can dig it. My main thing is that I think I'm doing everything
right--I'm unregistering event listeners before doing
removeChild()--but it seems that something still has a reference to my
deleted objects after I remove them. Any other tips for making sure
the code for one view has been deleted before I load another?

OK
DAH

 

Reply via email to