From: Mikko Rasa Date: Tue, 16 Nov 2010 20:12:17 +0000 (+0000) Subject: Fix a memory leak X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8883a5c80c3954fd4c2e96efb623a15d157ecb54;p=r2c2.git Fix a memory leak --- diff --git a/source/designer/trackwrap.cpp b/source/designer/trackwrap.cpp index 65c33d5..5e21ddc 100644 --- a/source/designer/trackwrap.cpp +++ b/source/designer/trackwrap.cpp @@ -23,6 +23,12 @@ TrackWrap::TrackWrap(Designer &d, Selection &s): selection.signal_changed.connect(sigc::mem_fun(this, &TrackWrap::selection_changed)); } +TrackWrap::~TrackWrap() +{ + for(map::iterator i=meshes.begin(); i!=meshes.end(); ++i) + delete i->second; +} + void TrackWrap::render(const GL::Tag &) const { for(list::const_iterator i=wraps.begin(); i!=wraps.end(); ++i) diff --git a/source/designer/trackwrap.h b/source/designer/trackwrap.h index 2f21125..3628515 100644 --- a/source/designer/trackwrap.h +++ b/source/designer/trackwrap.h @@ -31,6 +31,7 @@ private: public: TrackWrap(Designer &, Selection &); + ~TrackWrap(); virtual void render(const Msp::GL::Tag &) const;