How can you delete unused and uninitialized variables? I have some masks and filters that may get used depending on screen size, but when I don't need them, can I simply get rid of them? For example:
var appMask:Shape;
if ((screenR % 1) > 0) {
appMask = new Shape;
appMask.graphics.beginFill(0x000000);
appMask.graphics.drawRect(0,0,screenW,screenH);
appMask.graphics.endfill();
} else {
//delete appMask variable?
}
I have also considered making the new Shape on variable creation as well and setting it to null for garbage cleanup later, but I want to ensure this will work as expected.
Thanks!