From: Mikko Rasa Date: Tue, 21 Aug 2012 23:01:15 +0000 (+0300) Subject: Plug a memory leak X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=237bf34e27585f4083a9c8cea5a7df95f4c081e7;p=libs%2Fgl.git Plug a memory leak --- diff --git a/source/animatedobject.cpp b/source/animatedobject.cpp index e4aa0044..eec54aa7 100644 --- a/source/animatedobject.cpp +++ b/source/animatedobject.cpp @@ -20,6 +20,11 @@ AnimatedObject::AnimatedObject(const Object &o): shdata = new ProgramData; } +AnimatedObject::~AnimatedObject() +{ + delete shdata; +} + void AnimatedObject::set_matrix(const Matrix &m) { matrix = m; diff --git a/source/animatedobject.h b/source/animatedobject.h index 3f8487ba..df0b15eb 100644 --- a/source/animatedobject.h +++ b/source/animatedobject.h @@ -21,6 +21,7 @@ private: public: AnimatedObject(const Object &); + ~AnimatedObject(); void set_matrix(const Matrix &); void set_pose_matrix(unsigned, const Matrix &);