Matt,
 
My understanding from reading the binding code is that bindings do not use a
weak reference when they add an event listener, so bindings must be cleared
(unwatched) in order for an object to be available for GC?  Are bindings
created through MXML automatically unwatched at any point?  Or am I wrong
about bindings using a strong reference?
 
Thanks,
 
Sam
 

-------------------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
  

 


  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Chotin
Sent: Wednesday, January 23, 2008 11:34 AM
To: [email protected]
Subject: RE: [flexcoders] destructing objects / memory management best
practices



I'm not sure that binding is the first thing to look at.  Have you made sure
that relevant event listeners are adding themselves with the weakRef param
set to true?  Sometimes in addition to removing children you may also want
to try setting some references explicitly to null as that can help
accelerate garbage collection.  Finally, using the debug player make sure to
run the GC manually just to ensure that it isn't simply a delay in
recollection.  There is a known issue where event listeners that are still
around and should technically be GC'd might still receive event listener
messages until they have been reclaimed.

 

Matt

 

 

Reply via email to