]> git.tdb.fi Git - libs/gl.git/commitdiff
Plug a memory leak
authorMikko Rasa <tdb@tdb.fi>
Tue, 21 Aug 2012 23:01:15 +0000 (02:01 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 21 Aug 2012 23:01:15 +0000 (02:01 +0300)
source/animatedobject.cpp
source/animatedobject.h

index e4aa00445f4b42f83f63400b798772aa583777c1..eec54aa74f38d24ddb40e57d7e1bf922e951d76c 100644 (file)
@@ -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;
index 3f8487ba323768e51b292550abf5296579c16b53..df0b15ebe04e2f6cc6d91090ba60292c14a66adb 100644 (file)
@@ -21,6 +21,7 @@ private:
 
 public:
        AnimatedObject(const Object &);
+       ~AnimatedObject();
 
        void set_matrix(const Matrix &);
        void set_pose_matrix(unsigned, const Matrix &);