can I reuse a AW variable without creating memory leak or worse ?
var a= new AW.UI.Checkbox; .....; a= new AW.UI.Input; ....
In other words, is there any destructor that I should call before reusing variable "a" ?
Tuesday, March 11, 2008
If you just reuse the variable - the object will not be released from memory. This is because each AW object registers itself in the global array - AW.all. I don't think there is much problem with that unless you create thousands of AW objects. If you really want to remove the AW object from memory you should also clear the reference from AW.all array -