Memory leak

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REAPER
Posts: 8
Joined: Sat May 08, 2004 10:52 pm
Location: Russia, Moscow

Memory leak

Post by REAPER »

Destructor in CZipReader class doesn't clear list of files:

Code: Select all

CZipReader::~CZipReader()
{
	if (File)
		File->drop();

	s32 count = (s32)FileList.size();
}
MUST BE:

Code: Select all

CZipReader::~CZipReader()
{
	if (File)
		File->drop();

	FileList.clear();
}
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I don't think this would cause a memory leak. The FileList will be cleared automaticly. But the s32 count = (s32)FileList.size(); line is really senseless. :)
Post Reply