mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
memory optimizations (less leaks)
This commit is contained in:
parent
10e4e2937f
commit
c66d430702
@ -782,7 +782,7 @@ int CCreatureAnimation::nextFrame(SDL_Surface *dest, int x, int y)
|
||||
FTemp+='\0';
|
||||
}
|
||||
}
|
||||
delete RLEntries;
|
||||
delete [] RLEntries;
|
||||
RLEntries = NULL;
|
||||
if (BottomMargin>0)
|
||||
{
|
||||
|
Binary file not shown.
@ -289,6 +289,7 @@ SDL_Surface * CLodHandler::loadBitmap(std::string fname)
|
||||
{
|
||||
std::cout<<"an error "<<res<<" occured while extracting file "<<fname<<std::endl;
|
||||
}
|
||||
delete [] pcd;
|
||||
}
|
||||
CPCXConv cp;
|
||||
cp.openPCX((char*)pcx,entries[index].realSize);
|
||||
@ -464,6 +465,7 @@ std::vector<CDefHandler *> CLodHandler::extractManyFiles(std::vector<std::string
|
||||
CDefHandler * nh = new CDefHandler;
|
||||
nh->openFromMemory(decomp, entries[i].realSize, std::string((char*)entries[i].name));
|
||||
nh->alphaTransformed = false;
|
||||
delete [] decomp;
|
||||
ret[curDef] = nh;
|
||||
}
|
||||
delete[] outp;
|
||||
|
Loading…
Reference in New Issue
Block a user