Detected memory leak when testing MyGui with Boost UnitTest

kamaliang

10-05-2010 15:46:28

MyGui: /svnroot/my-gui/tags/MyGUI3.0 the latest version (2982)
OGRE: OgreSDK_vc9_v1-7-1p1
VC: 2008
Boost: 1.4.0

Please have a check with it... thanks...

Altren

11-05-2010 11:37:09

Well, and where should we look at? Does it give any more info about leak. What Demo/Tool you tested?

kamaliang

15-05-2010 02:03:57

1. Create a project with Ogreappwizards_1.7.X;
2.

void MyGuiUT::createScene(void)
{
mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(mWindow, mSceneMgr);
mGUI = new MyGUI::Gui();
mGUI->initialise("core.xml");
}

void MyGuiUT::destroyScene( void )
{
if (mGUI)
{
mGUI->shutdown();
delete mGUI;
mGUI = NULL;
}

if (mPlatform)
{
mPlatform->shutdown();
delete mPlatform;
mPlatform = NULL;
}
}


3. In the main.cpp :

#define BOOST_TEST_MODULE MyTest
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE( my_test )
{
MyGuiUT app;

try
{
app.go();
}
catch( Ogre::Exception& e )
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occured: " <<
e.getFullDescription().c_str() << std::endl;
#endif
}
}


4. Run in debug mode, after exit the App, you can see some memory leak detected showing in the console...

:shock:

kamaliang

28-05-2010 10:06:06

:oops:
:?:

my.name

28-05-2010 14:56:15

Show MyGUI.log

kamaliang

14-01-2011 06:10:15

:wink:

I got the latest code in tags\MyGUI3.0 and have a test, it seems that this bug has been solved !!!
In the log of the svn3592 & 3593 said that "fix memory leaks" !

Cheer !!!