First off I am making my objects with the
Beebe Games Class. I am also using the doTansition and for its onComplete function I have made the following function (inside the function I am using to make the enemy):
Code:
local removeEnemy = function()
enemy:destroy()
enemy = nil
end
It is being called (I tested by putting a print("Here") inside of the function. But, after a while my iStats menu bar shows that the Corona Simulator is slowly taking up more and more of my free memory. I think that I am not not removing the enemy object right since it is the only object I am creating continuously.
What should I change my onComplete function to?