Jump to content
  • Advertisement
Sign in to follow this  
lougv22

Need help with OGRE engine memory leak

This topic is 4065 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am working on a game utilizing the OGRE engine. Programming is done in C++. I am getting the following memory leak that I need help resolving: Alloc. Addr Size Addr Size BreakOn BreakOn Number Reported Reported Actual Actual Unused Method Dealloc Realloc Allocated by ------ ---------- ---------- ---------- ---------- ---------- -------- ------- ------- --------------------------------------------------- 000018 0x07529A48 0x00000034 0x07529A38 0x00000054 0x00000000 new N N ogregraphicssystemimpl.cpp(30) Star::OgreGraphicsSystemImpl::OgreGraph Where line 30 in ogregraphicssystemimpl.cpp looks like this: logMgr = new Ogre::LogManager; logMgr is defined like so in file ogregraphicssystemimpl.h: Ogre::LogManager* logMgr; My operating system is Windows XP SP2 and the development environment is Visual Studio 2005. Any help would be appreciated. [Edited by - lougv22 on June 5, 2007 1:51:42 PM]

Share this post


Link to post
Share on other sites
Advertisement
Yes, I am deleting it. I have a destructor for the class that looks like this::

OgreGraphicsSystemImpl::~OgreGraphicsSystemImpl()
{
.............

..................
if(logMgr) STAR_DELETE(logMgr);
.................
.................
}

where STAR_DELETE is a method that takes care of the deleting.

Share this post


Link to post
Share on other sites
Oops, never mind that. The reason why I was getting that memory leak report was because I did not shut down the game the proper way. I exited by clicking the Stop Debugging button (it looks like a square) in Visual Studio 2005, which I guess caused the game to exit prematurely without going through all of its clean-up routines, hence the memory leaks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!