From 237bf34e27585f4083a9c8cea5a7df95f4c081e7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 22 Aug 2012 02:01:15 +0300 Subject: [PATCH] Plug a memory leak --- source/animatedobject.cpp | 5 +++++ source/animatedobject.h | 1 + 2 files changed, 6 insertions(+) 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 &); -- 2.45.2