I wonder how I can work with images when using functions or other kind of “pointers”.
Here is an example:
myObj=display.newImageRect("myObj.png",64,64) local doSomething = function (obj) obj.x=obj.x+1 end doSomething (myObj)
How can I make sure this object is moved from memory 100%?
Is it enough to destroy the object “myObj” later here? Or do I have to think about “obj” inside the function also?
Thx for your help!
