Does removing objects slow performance?

local object = display.newCircle( 128, 128, 64 )

local object2 = display.newCircle( 32, 128, 64 )

–Too many objects later…

object:removeSelf()

object = nil

object2:removeSelf()

object2 = nil

object…

How does perform code removing too many objects?

Not really. Certainly, it will be a lot better for performance than just keeping the objects around doing nothing, set to invisible or off-screen. But if you can re-use objects using pooling to prevent too many create/destroy events that’s even better.

Not really. Certainly, it will be a lot better for performance than just keeping the objects around doing nothing, set to invisible or off-screen. But if you can re-use objects using pooling to prevent too many create/destroy events that’s even better.