From d548e9bc6c987a4834ce3d65b33108f55e0f7a2c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 May 2011 17:18:41 +0300 Subject: Fix memory leaks in being, socialwindow classes. --- src/being.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/being.cpp') 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()); -- cgit v1.2.3-60-g2f50