performance tweaks

okay im back again. I had to make changes additions to my game. Im finally finished except now it looks like im spewing memory.

What I mean is the garbage heap grows fast …even before the game play begins and once it gets to about 1200 it collects garbage which is causing a very noticeable lag.

I’ve gone through my code at least multiple times in the past 3 days and although I have identified some problems and corrected them i cant seem to make a dent in the amount of garbage and the rate that it accumulates.

What is better to use local variables or global? currently im using locals where possible but i have seemed to run out of local variables(im at 200).

What other types of things should I be looking for? are there general performance guidelines posted anywhere?

[import]uid: 27671 topic_id: 8868 reply_id: 35033[/import]

could someone answer my question on collision in game development? thanks [import]uid: 54001 topic_id: 8868 reply_id: 35039[/import]

I want to make sure that images that are no longer needed are indeed removed and set to nil.

Is there a way to list what the display stack currently has in memory?

[import]uid: 27671 topic_id: 8868 reply_id: 35074[/import]

I figured it out. in this case it was because i added a postCollision listener and it was slowing it down tremendously. [import]uid: 27671 topic_id: 8868 reply_id: 35176[/import]