2
votes

I have 2 controllers.

Controller 1:

var x = 1;
var y = ImageView;

Controller 2:

var Z = 1;
var K = ImageView;

I close controller 1 to go to controller 2 and want to know if I must set x and y to null to free memory.

1

1 Answers

1
votes

variable like x and y in your code terminate by the termination of the controller you just need to make sure that you terminate the controller correctly. the better way to terminate controller by calling its view directly

win.add(Alloy.createController('test',{}).getView());