Jens Beyer has proposed merging lp:~widelands-dev/widelands/bug1438611 into
lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1438611 in widelands: "Widelands is leaking memory"
https://bugs.launchpad.net/widelands/+bug/1438611
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug1438611/+merge/273449
Memory leak - destructor which cleans up animations, found by Valgrind, also
see related bug.
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/bug1438611 into lp:widelands.
=== modified file 'src/graphic/animation.cc'
--- src/graphic/animation.cc 2014-12-08 05:22:52 +0000
+++ src/graphic/animation.cc 2015-10-05 17:48:17 +0000
@@ -464,3 +464,9 @@
return *m_animations[id - 1];
}
+
+AnimationManager::~AnimationManager()
+{
+ for (vector<Animation*>::iterator it = m_animations.begin(); it != m_animations.end(); ++it)
+ delete *it;
+}
=== modified file 'src/graphic/animation.h'
--- src/graphic/animation.h 2014-12-07 15:41:39 +0000
+++ src/graphic/animation.h 2015-10-05 17:48:17 +0000
@@ -94,6 +94,7 @@
*/
class AnimationManager {
public:
+ ~AnimationManager();
/**
* Loads an animation, graphics sound and everything.
*
_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp