Panel close problem


I have a panel inside a panel. there is also a close button inside the panel. on click of close button it should close the inside panel and clear all memory associated with it. How can it be implemented?


I think you can use something like this :

insidePanel = null;

Then as long as you you don’t keep yourself any reference to insidePanel it should get garbage collected soon.