diff options
author | Robert Špalek | 2009-09-27 18:11:06 +0000 |
---|---|---|
committer | Robert Špalek | 2009-09-27 18:11:06 +0000 |
commit | fc2bb50600e393cdb3d1e868b9274a43d05bca21 (patch) | |
tree | 97c56a0331cb9cc3a286077f3323dd2e1c8e5677 /engines/draci/animation.h | |
parent | 8b6b3358c8cab75cd693fb3a3abc16990c5850b5 (diff) | |
download | scummvm-rg350-fc2bb50600e393cdb3d1e868b9274a43d05bca21.tar.gz scummvm-rg350-fc2bb50600e393cdb3d1e868b9274a43d05bca21.tar.bz2 scummvm-rg350-fc2bb50600e393cdb3d1e868b9274a43d05bca21.zip |
Remove memory leak in animation manager. Get rid of 1 non-const reference parameter.
svn-id: r44413
Diffstat (limited to 'engines/draci/animation.h')
-rw-r--r-- | engines/draci/animation.h | 9 |
1 files changed, 8 insertions, 1 deletions
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<Drawable*> _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<Animation *> _animations; /** The index of the most recently added animation. |