The reason I have questions as to the execution methods with removeAllChildren() is because this doc http://livedocs.adobe.com/flex/3/html/help.html?content=usingas_3.html refers to deferred garbage collection, but doesn't go into more detail.
It is not deferred. There's probably some other reason. Maybe removeAllChildren still manages to get called after you add the children? Check the numChildren. Check invalidate***Flag properties.
Flex SDK Developer
Adobe Systems Inc.
I checked the numChildren properties and it shows expected number. I'm wondering if it has something to do with removeAllChildren not actually clearing the objects from memory until the garbage collector runs, but only removing the pointer to them? But that would adjust numChildren to 0 I would think.
I'm turning the code upside down right now, searching for anything else that may cause it.
Thanks Flex harUI,
You were right, I found the offending line of code (and it was completely unrelated to removeAllChildren()). Now, after correcting the issue, removeAllChildren() behaves as expected and does not behave in a deferred manner.