Destroy Actor Clean Up
![azimpact](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I'm getting deeper into my game and have seen posts about garbage cleanup.
I want to make sure I do it right from the start before I go deeper so I have a few questions if someone could answer it would be greatly appreciated.
1. When an actor is destroyed in a scene, is the memory usage from that actor freed up or does it linger until you leave that scene. If so, how do you make sure they are actually destroyed and free up any resources that they were using?
2. Any good links to posts about cleaning up the garbage during game play?
I want to make sure I do it right from the start before I go deeper so I have a few questions if someone could answer it would be greatly appreciated.
1. When an actor is destroyed in a scene, is the memory usage from that actor freed up or does it linger until you leave that scene. If so, how do you make sure they are actually destroyed and free up any resources that they were using?
2. Any good links to posts about cleaning up the garbage during game play?
Comments
2. Depending on your game, recycling may be better on resources for you. Check out the recycling tutorial in the GS Cookbook. Instead of destroying an actor, it's moved off-screen to be recycled again. I don't think recycling is suited or possible for every possible situation so you should test it out for your particular game setup and see if it yields any performance gains.
- Jeff