PDA

View Full Version : Clearing memory


lefcourt
10-27-2005, 10:33 AM
Hello,
Here's my latest problem... If I'm creating an application with, say, 20 subcomponents, how do I ensure that memory is cleared when moving between the components?

I've done a bit of testing with this. I declare states A, B and C, all with initstage="defer" and apply="false". I then create buttons which cause one to to be applied and the rest to be unapplied. The good news is that the components do not get instantiated until I apply them. The bad news is that memory doesn't seem to ever get cleared! If I populate each state with some components, FireFox's memory starts at about 37MB. When I apply state A, it goes up to 45MB. When I unapply A and apply B, it goes up to 45.5MB. When I unapply B and apply C, it goes to 46MB. If I unapply C and go back to A, it goes up to 51MB... How can I ensure that states B and C get cleared when A is applied?

Also of note: I tried adding .destroy() statements when the states are un-applied, and that did not help.

Thanks!

- Jes