Closed Hotshot5000 closed 1 month ago
Should probably be something like this: `PCZSceneManager::~PCZSceneManager() { // we don't delete the root scene node here because the // base scene manager class does that.
// delete ALL portals
Portal * p;
PortalList::iterator i = mPortals.begin();
for (i = mPortals.begin(); i != mPortals.end(); i++)
{
p = *i;
OGRE_DELETE p;
}
mPortals.clear();
AntiPortal * ap;
AntiPortalList::iterator iap = mAntiPortals.begin();
for (iap = mAntiPortals.begin(); iap != mAntiPortals.end(); iap++)
{
ap = *iap;
OGRE_DELETE ap;
}
mAntiPortals.clear();
// delete all the zones
for (ZoneMap::iterator j = mZones.begin();
j != mZones.end(); ++j)
{
OGRE_DELETE j->second;
}
mZones.clear();
mDefaultZone = 0;
}`
sounds valid. can you provide a pull-request?
https://github.com/OGRECave/ogre/pull/3134
Waiting for the checks to pass.
EDIT: PR seems validated.
In PCZSceneManager destructor I see that mPortals get deleted but mAntiPortals are not deleted. Same in init() only mPortals get deleted.