diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-26 19:15:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-26 19:15:48 +0300 |
commit | aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17 (patch) | |
tree | 463861d544a1b6bb4fbab4f5176fe812e6b58d97 /src/particleemitter.cpp | |
parent | ce6905ac29998890ed41dc3039bb548a440e2608 (diff) | |
download | plus-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.gz plus-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.bz2 plus-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.xz plus-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.zip |
Fix some imageset memory leaks.
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r-- | src/particleemitter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index 33c2f1d92..5f107abb7 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -210,6 +210,7 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, logger->log1("Error: no valid imageset"); continue; } + mTempSets.push_back(imageset); // Get animation frames for_each_xml_child_node(frameNode, propertyNode) @@ -293,6 +294,7 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, logger->log1("Error: no valid imageset"); continue; } + mTempSets.push_back(imageset); // Get animation frames for_each_xml_child_node(frameNode, propertyNode) @@ -437,6 +439,14 @@ ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter &o) ParticleEmitter::~ParticleEmitter() { + for (std::list<ImageSet*>::iterator + i = mTempSets.begin(); + i != mTempSets.end(); ++i) + { + if (*i) + (*i)->decRef(); + } + if (mParticleImage) mParticleImage->decRef(); } |