how efficient is corona with spawning? do display objects release their memory as soon as they’re removed/destroyed? i had a recycling system setup in gs where the enemies came from the left side of the screen then when they were “killed” they just moved off screen to the left. only problem was tricky to setup as every time they recycled they had to change to a different actor. is it worth bothering to do this in corona? or could i get away with just having them spawn and destroy? opinions please
[import]uid: 80874 topic_id: 14529 reply_id: 314529[/import]
I’ve never had a problem with spawn and destroy.
Recycling is fine too if you want to do that but really, a simple obj:removeSelf() will do it.
You could also put obj = nil after removal if you’d like to be ultra cautious 
Peach
[import]uid: 52491 topic_id: 14529 reply_id: 53718[/import]
thanks peach
that will save some time for me in rebuilding my app [import]uid: 80874 topic_id: 14529 reply_id: 53720[/import]
This is my first time at this forum, so, i used the two methods, and they area better when used together, my experience with lua is nothing, i came from C++, but is a good practice to always be careful with the device memory, even with frameworks and high levels language manage the background. [import]uid: 85979 topic_id: 14529 reply_id: 53736[/import]
If you manage your code correctly either method is fine. If your spawning and destroying, just make sure you clean up after the destroy. [import]uid: 84637 topic_id: 14529 reply_id: 53754[/import]