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 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sebastian Feher Sent: Tuesday, January 22, 2008 7:58 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] destructing objects / memory management best practices I'm working on a medium-large Flex app and there I ran into 2 memory management related issues: First - quite a bit of memory is wasted and leaks after removing UI containers from the UI as the object is never collected. Second - the ghost objects that are now removed from UI are still active or at least parts of them are and continue to respond to messages. Before going any further - I know a solution would be to manually unwatch all ChangeWatcher resulted from the BindingUtils.bindSetter that are used to cascade changes between models. However the object hierarchy rooted in the UI containers is quite deep and traverse it and calling a "destructor" for each type of object is both non- trivial and very non-elegant. Did anyone else run into similar issues? Any ideas would be extremely helpful at this point. Best regards, Sebastian