Best method to remove a sprite?

I have a game using sprites. I have a series of sprites that all share the same sprite sheet. What’s the best method to remove sprites?

I don’t want to dispose of the sprite sheet, since other sprites will be using it. So I’m guessing spriteSheet:dispose() is not good choice.

Would it be good to just stop the sprites and hide or move them off the stage then reuse them as needed. Rather than deleting and recreating them as the game plays?
[import]uid: 98652 topic_id: 18953 reply_id: 318953[/import]

i think reusing them will definitely be good for device memory [import]uid: 16142 topic_id: 18953 reply_id: 72988[/import]

Thanks I tried moving them off the top of the stage when they are destroyed. Which seems to work well. [import]uid: 98652 topic_id: 18953 reply_id: 73014[/import]

Maybe set the


obj.isVisible = false[/lua]

also to save on performance (no point rendering off screen images until needed of course) :slight_smile: [import]uid: 84637 topic_id: 18953 reply_id: 73351[/import]

Thanks, I knew there had to be a visible property. I hadn’t noticed isVisible previously. [import]uid: 98652 topic_id: 18953 reply_id: 73427[/import]