1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Fixed a good number of memory leaks.

The objects created with "new" were destroyed with "free()",
instead of "delete"; as a result, the destructors were never called.
This commit is contained in:
Ayla
2011-07-20 13:43:25 +02:00
parent 5a27851aea
commit 81a607c36e
5 changed files with 17 additions and 18 deletions

View File

@@ -139,7 +139,7 @@ Surface *SurfaceCollection::addSkinRes(const string &path, bool useDefault) {
void SurfaceCollection::del(const string &path) {
SurfaceHash::iterator i = surfaces.find(path);
if (i != surfaces.end()) {
free(i->second);
delete i->second;
surfaces.erase(i);
}
}