creating a new Object in draw() loop
in
Programming Questions
•
3 years ago
Hi, just a general question: if you have a line of code like
ball = new Circle(x, y);
in the draw() function, what happens to the data during each iteration? Does the old Circle object get discarded and a new one assigned to the variable "ball"? Or is there data piling up somewhere?
ball = new Circle(x, y);
in the draw() function, what happens to the data during each iteration? Does the old Circle object get discarded and a new one assigned to the variable "ball"? Or is there data piling up somewhere?
1