diff options
-rw-r--r-- | src/being.cpp | 3 | ||||
-rw-r--r-- | src/gui/socialwindow.cpp | 6 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 2 |
3 files changed, 10 insertions, 1 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()); diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 0be9dd70f..d87b94bad 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -470,9 +470,14 @@ public: } if (!finded) + { + delete *ai; avatars->erase(ai); + } else + { ++ai; + } } std::vector<std::string>::iterator i = names.begin(); @@ -745,6 +750,7 @@ public: if (ava && ava->getX() == x && ava->getY() == y) { + delete ava; avatars->erase(i); return; } diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 2cd59ee29..37610f659 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -353,7 +353,7 @@ SpriteDef::~SpriteDef() delete *i; } -//need actions.clear? + mActions.clear(); for (ImageSetIterator i = mImageSets.begin(); i != mImageSets.end(); ++i) |