Garbage collection?

I have 40 -50 levels in my game… Is there a way i can delete all the variables, listeners, and objects in the levels, because they are causing me problems.

Will this effect openfeint???
[import]uid: 24708 topic_id: 12445 reply_id: 312445[/import]

anything you are not using, be it a variable, a listener, a table, a function…set them to nil before switching scenes, and they will be garbage collected.

This should not effect openFeint, but it will depend on how you are calling the open feint functionality. [import]uid: 5317 topic_id: 12445 reply_id: 45611[/import]

I’m curious about this because successive game plays currently slows down my framerate and each start of game gets worse and worse; something is not getting cleaned up. I’m removing groups as I proceed from screen to screen:

xGroup:removeSelf()

But something is up… I suspect something about my sprites is the culprit. Hmmm… [import]uid: 74844 topic_id: 12445 reply_id: 46845[/import]

If you’re using movieclip there’s a massive memory leak in it view the other post here on the main screen for a possible fix. If you’re using sprite…well I dunno then :slight_smile: [import]uid: 75335 topic_id: 12445 reply_id: 46887[/import]

I’ve determined my Sprite load is solid; textureMemoryUsed shows a solid number. Something else is going on.

(No, I’m personally not using movieclip) [import]uid: 74844 topic_id: 12445 reply_id: 46889[/import]