From fc2bb50600e393cdb3d1e868b9274a43d05bca21 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Sun, 27 Sep 2009 18:11:06 +0000 Subject: Remove memory leak in animation manager. Get rid of 1 non-const reference parameter. svn-id: r44413 --- engines/draci/animation.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/draci/animation.h') diff --git a/engines/draci/animation.h b/engines/draci/animation.h index d71da984cd..2358775d8d 100644 --- a/engines/draci/animation.h +++ b/engines/draci/animation.h @@ -79,7 +79,6 @@ public: void setCurrentFrame(uint frame); uint currentFrameNum() const; uint getFrameCount() const; - void deleteFrames(); bool isPlaying() const; void setPlaying(bool playing); @@ -114,6 +113,7 @@ public: private: uint nextFrameNum() const; + void deleteFrames(); /** Internal animation ID * (as specified in the data files and the bytecode) @@ -138,6 +138,9 @@ private: bool _playing; bool _looping; bool _paused; + + /** Array of frames of the animation. The animation object owns these pointers. + */ Common::Array _frames; AnimationCallback _callback; @@ -180,6 +183,10 @@ private: void insertAnimation(Animation *anim); DraciEngine *_vm; + + /** List of animation objects, maintained sorted by decreasing Z-coordinates. + * The animation manager owns the pointers. + */ Common::List _animations; /** The index of the most recently added animation. -- cgit v1.2.3