summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-30 17:18:41 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-30 17:18:41 +0300
commitd548e9bc6c987a4834ce3d65b33108f55e0f7a2c (patch)
tree97b58a414c6b8c910afb54bfacfc303e926f849d /src/being.cpp
parenta5406f20dba001d4491eb90296c181857c37eabf (diff)
downloadplus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.tar.gz
plus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.tar.bz2
plus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.tar.xz
plus-d548e9bc6c987a4834ce3d65b33108f55e0f7a2c.zip
Fix memory leaks in being, socialwindow classes.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index f414400be..27b4721b4 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -1716,7 +1716,10 @@ void Being::addToCache()
beingInfoCache.push_front(entry);
if (beingInfoCache.size() >= CACHE_SIZE)
+ {
+ delete beingInfoCache.back();
beingInfoCache.pop_back();
+ }
}
entry->setName(getName());
entry->setLevel(getLevel());