# HG changeset patch # User vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1283791404 0 # Node ID 2032ec27b851924be987b0305030d96e1b9cf073 # Parent 6856cdb22351550c1d0d248a751d22ae5b657938 fixed small memory leak in map destructor; cameras were not being deleted when the map was deleted. diff -r 6856cdb22351 -r 2032ec27b851 engine/core/model/structures/map.cpp --- a/engine/core/model/structures/map.cpp Sun Sep 05 00:41:26 2010 +0000 +++ b/engine/core/model/structures/map.cpp Mon Sep 06 16:43:24 2010 +0000 @@ -59,6 +59,13 @@ } Map::~Map() { + // remove all cameras + std::vector::iterator iter = m_cameras.begin(); + for ( ; iter != m_cameras.end(); ++iter) { + delete *iter; + } + m_cameras.clear(); + deleteLayers(); }