Answer the question
In order to leave comments, you need to log in
How to delete objects in corona?
I have a game for the crown. And I need to delete objects that have gone beyond the screen, how to do this? I rummaged through the Internet, but still I couldn’t do it, what should I do?
Answer the question
In order to leave comments, you need to log in
obj:removeSelf();
Plus, you need to remove all references to this object so that the garbage collector can clean it from memory. More or less like this:
event.object1:removeSelf();
event.object1 = nil;
obj = nil;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question