Menu

#2 Crash caused in SubspaceZone.cpp

open
nobody
None
8
2009-04-03
2009-04-03
Hakaku
No

template <class ListType>
void SubspaceZone::updateList(ListType& list, double timeStep, ObjectLayerType layer)
{
ListType::iterator i;
ListType::value_type item;
bool doDelete = false;

for(i = list.begin(); i != list.end(); ++i)
{
item = (*i);
if(item)
{
item->update(timeStep);
}

if(!item || item->isGarbage())
{
i = list.erase(i);
--i;
}

if(item->isGarbage())
{
/*if(layer != UnknownLayer)
displayManager_[layer].removeObject(item);*/
delete item;
//item = 0;
}
}
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.