What uses more memory? store a var on initialize or on a separate function, does initialize uses var different??
What uses more memory? store a var on initialize or on a separate function, does initialize uses var different??
if both vars you're talking about are equal in scope it will not matter much where you assign a value to the variable. one thing that is different is that the initial moment of memory consumption will be different (it'll consume memory as of the assignment).
you can free memory by assigning null to the variable