The only way I was able to have GC remove these objects was to remove their 
children first - radio buttons, checkboxes, etc., then remove them.  Seems odd 
but it works.

Thanks for your help.

Thanks,
Brandon

--- On Tue, 10/20/09, Alex Harui <aha...@adobe.com> wrote:

From: Alex Harui <aha...@adobe.com>
Subject: RE: [flexcoders] RemoveChild not removing instance from memory
To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
Date: Tuesday, October 20, 2009, 8:57 PM






 




    
                  







The profiler will show you what is still hanging on to those
objects. 

   



Alex Harui 

Flex SDK Developer 

Adobe
Systems Inc. 

Blog: http://blogs. adobe.com/ aharui 



   





From: flexcod...@yahoogro ups.com
[mailto:flexcoders@ yahoogroups. com] On Behalf Of Brandon Krakowsky

Sent: Tuesday, October 20, 2009 1:02 PM

To: flexcod...@yahoogro ups.com

Subject: [flexcoders] RemoveChild not removing instance from memory 





   

   








 
  
  Hello there.  I've got a VBox into which I'm
  dynamically adding multiple instances of a custom UIComponent.  When I
  try to remove them, and add new instances, the old instances seem to hang
  around in memory, as well as the assets contained within - UITextFields,
  Radio Buttons, etc.

  

  I remove all listeners and have no other references to the custom
  UIComponents.  I've tried removeAllChildren( ) as well as iterating
  through each child and using removeChildAt( 0).

  

  The instances just build up in memory as I load new instances.  Garbage
  Collection does not clean them up.

  

  Thanks,

  Brandon 
  
 


   





 









 

      

    
    
        
         
        
        








        


        
        


      

Reply via email to