AnimationSystem memory leaks???
Posted: Thu Dec 09, 2010 08:14
hi ce~
i'm not sure, is this cegui's memory leaks..
But, i has exclude my code step by step..finally find when i add blow code will bring memory leaks..
I am a green hand~so i'm not sure this is right. .waiting for your answer..
so, i go into cegui code page, and find many about animationsystem's class, they don't clear their members..
like:
and
i'm not sure, is this cegui's memory leaks..
But, i has exclude my code step by step..finally find when i add blow code will bring memory leaks..
Code: Select all
CEGUI::AnimationManager& animMgr = CEGUI::AnimationManager::getSingleton();
animMgr.loadAnimationsFromXML("GuiFuncBtns.xml");
I am a green hand~so i'm not sure this is right. .waiting for your answer..
so, i go into cegui code page, and find many about animationsystem's class, they don't clear their members..
like:
Code: Select all
//----------------------------------------------------------------------------//
void Animation::destroyAffector(Affector* affector)
{
AffectorList::iterator it =
std::find(d_affectors.begin(), d_affectors.end(), affector);
if (it == d_affectors.end())
{
CEGUI_THROW(InvalidRequestException(
"Animation::destroyAffector: Given affector not found!"));
}
d_affectors.erase(it);
}
//----------------------------------------------------------------------------//
and
Code: Select all
//----------------------------------------------------------------------------//
void AnimationManager::destroyAnimation(const String& name)
{
AnimationMap::iterator it = d_animations.find(name);
if (it == d_animations.end())
{
CEGUI_THROW(UnknownObjectException(
"AnimationManager::destroyAnimation: Animation with given name not "
"found."));
}
Animation* animation = it->second;
destroyAllInstancesOfAnimation(animation);
d_animations.erase(it);
delete animation;
}