mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +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';
|
FTemp+='\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete RLEntries;
|
delete [] RLEntries;
|
||||||
RLEntries = NULL;
|
RLEntries = NULL;
|
||||||
if (BottomMargin>0)
|
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;
|
std::cout<<"an error "<<res<<" occured while extracting file "<<fname<<std::endl;
|
||||||
}
|
}
|
||||||
|
delete [] pcd;
|
||||||
}
|
}
|
||||||
CPCXConv cp;
|
CPCXConv cp;
|
||||||
cp.openPCX((char*)pcx,entries[index].realSize);
|
cp.openPCX((char*)pcx,entries[index].realSize);
|
||||||
@ -464,6 +465,7 @@ std::vector<CDefHandler *> CLodHandler::extractManyFiles(std::vector<std::string
|
|||||||
CDefHandler * nh = new CDefHandler;
|
CDefHandler * nh = new CDefHandler;
|
||||||
nh->openFromMemory(decomp, entries[i].realSize, std::string((char*)entries[i].name));
|
nh->openFromMemory(decomp, entries[i].realSize, std::string((char*)entries[i].name));
|
||||||
nh->alphaTransformed = false;
|
nh->alphaTransformed = false;
|
||||||
|
delete [] decomp;
|
||||||
ret[curDef] = nh;
|
ret[curDef] = nh;
|
||||||
}
|
}
|
||||||
delete[] outp;
|
delete[] outp;
|
||||||
|
Loading…
Reference in New Issue
Block a user