Sign in to follow this  

Need help with OGRE engine memory leak

This topic is 3846 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
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

This topic is 3846 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this