Solon
25-11-2006 19:24:44
Hi!
Started fiddling with Ogre/Mogre the other day, and decided to try to port the SpriteManager2D (http://www.ogre3d.org/wiki/index.php/SpriteManager2d) to Mogre. It works, after a fashion. Problem is I am getting a memory leak every time the buffer is recreated.
I've tried nulling/Disposing/Destroying everything I can think of, but there must be some proper way to remove the VertexData from the RenderOperation, which I assume is causing the problem. It's fair to say I could be using Mogre in the wrong way. Only used it since last night after all
For the record, I can use Windows Task Manager to confirm the leak by recreating the buffer in every frame. Code is here
http://www.cs.umu.se/~dahlin/Ogre2DManager.cs
Maybe I should avoid recreating the VertexData everytime I recreate the hardware buffer?
All help is greatly appreciated!
/Solon
Started fiddling with Ogre/Mogre the other day, and decided to try to port the SpriteManager2D (http://www.ogre3d.org/wiki/index.php/SpriteManager2d) to Mogre. It works, after a fashion. Problem is I am getting a memory leak every time the buffer is recreated.
083196 0x0919C680 0x00000038 0x0919C670 0x00000058 0x00000000 new N N MogreVertexIndexData.cpp(68) Mogre::VertexData::VertexData
I've tried nulling/Disposing/Destroying everything I can think of, but there must be some proper way to remove the VertexData from the RenderOperation, which I assume is causing the problem. It's fair to say I could be using Mogre in the wrong way. Only used it since last night after all
For the record, I can use Windows Task Manager to confirm the leak by recreating the buffer in every frame. Code is here
http://www.cs.umu.se/~dahlin/Ogre2DManager.cs
Maybe I should avoid recreating the VertexData everytime I recreate the hardware buffer?
All help is greatly appreciated!
/Solon