ZVISION: Delete Puzzles from heap before clearing _activePuzzles

This commit is contained in:
richiesams 2013-08-20 20:55:00 -05:00
parent 8e22af36b7
commit ac7b2251bb

View file

@ -248,6 +248,9 @@ void ScriptManager::changeLocationIntern() {
// Clear all the containers
_referenceTable.clear();
_puzzlesToCheck.clear();
for (Common::List<Puzzle *>::iterator iter = _activePuzzles.begin(); iter != _activePuzzles.end(); iter++) {
delete (*iter);
}
_activePuzzles.clear();
// We can clear without deleting from the heap because we use SharedPtr
_activeControls.clear();