From bcb3e7243a875634b1a1b489e442d2f6eac41489 Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 12 Dec 2010 02:36:22 +0000 Subject: [PATCH] Fixed more leaks git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6971 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/states_screens/feature_unlocked.cpp | 5 +++-- src/states_screens/feature_unlocked.hpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/states_screens/feature_unlocked.cpp b/src/states_screens/feature_unlocked.cpp index ebbbf629a..1d9ac4de6 100644 --- a/src/states_screens/feature_unlocked.cpp +++ b/src/states_screens/feature_unlocked.cpp @@ -189,7 +189,7 @@ void FeatureUnlockedCutScene::init() if (unlockedStuffCount == 0) std::cerr << "There is nothing in the unlock chest!!!\n"; - m_all_kart_models.clear(); + m_all_kart_models.clearAndDeleteAll(); for (int n=0; naddMesh(mesh); + mesh->drop(); #ifdef DEBUG m_unlocked_stuff[n].m_root_gift_node->setName("unlocked track picture"); #endif @@ -274,7 +275,7 @@ void FeatureUnlockedCutScene::tearDown() #endif m_unlocked_stuff.clearAndDeleteAll(); - m_all_kart_models.clear(); + m_all_kart_models.clearAndDeleteAll(); } // tearDown // ---------------------------------------------------------------------------- diff --git a/src/states_screens/feature_unlocked.hpp b/src/states_screens/feature_unlocked.hpp index e898c8a22..06cd51730 100644 --- a/src/states_screens/feature_unlocked.hpp +++ b/src/states_screens/feature_unlocked.hpp @@ -62,7 +62,8 @@ class FeatureUnlockedCutScene : public GUIEngine::Screen, public GUIEngine::Scre ptr_vector m_unlocked_stuff; /** To store the copy of the KartModel for each unlocked kart. */ - std::vector m_all_kart_models; + ptr_vector m_all_kart_models; + /** sky angle, 0-360 */ float m_sky_angle;