if i have following code :
class Stand {
public static const STAND_LIST:Array = new Array();
STAND_LIST[0] = new Array();
STAND_LIST[1] = new Array();
public function Stand() {
//constructor
}
}
is the STAND_LIST[0] keeps created every new instance of Stand created? or is it created just once?
if it’s created every new instance of Stand created, how do i make it run just once?(like initializing const)
Statics are initialized once for the class; they are not initialized each time a new class instance is created.
Here’s a helpful link regarding static initializers in ActionScript:
This SO Q&A briefly discusses when statics are initialized.