ZVISION: Delete Puzzles from heap before clearing _activePuzzles
This commit is contained in:
parent
8e22af36b7
commit
ac7b2251bb
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue