codo
05-01-2008 13:08:05
Hello, I'm having problems with out of memory bug in my game.
When I load a new game NVperfhud shows that the game consumes 100MB of card memory. Then I go exit to main menu and clear everything out:
The green bar is almost of the same height - let's say 98MB. Then I start the game again. New memory comsumption takes place after a while it's 120MB. Exit to menu (clearing, reinitializing), new game: 140MB.
Is this normal?
When I load a new game NVperfhud shows that the game consumes 100MB of card memory. Then I go exit to main menu and clear everything out:
MaterialManager.Singleton.UnloadUnreferencedResources();
sceneMgr.ClearScene();
sceneMgr.DestroyAllAnimations();
sceneMgr.DestroyAllBillboardSets();
sceneMgr.DestroyAllEntities();
sceneMgr.DestroyAllLights();
sceneMgr.DestroyAllStaticGeometry();
sceneMgr.DestroyAllMovableObjects();
MeshManager.Singleton.RemoveAll();
if (camera != null)
{
camera.SceneManager.DestroyCamera(camera.Name);
//camera.Dispose();
camera = null;
}
this.window.RemoveAllViewports();
CompositorManager.Singleton.RemoveAll();
The green bar is almost of the same height - let's say 98MB. Then I start the game again. New memory comsumption takes place after a while it's 120MB. Exit to menu (clearing, reinitializing), new game: 140MB.
Is this normal?