This commit is contained in:
Luis Ángel San Martín 2015-03-19 22:11:26 +01:00
parent ad32065986
commit e2af591e89

View File

@ -178,12 +178,16 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
CompressedArchive::~CompressedArchive() CompressedArchive::~CompressedArchive()
{ {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
if(isRar) //TODO: fix this!!! Possible memory leak. If AddRef is not used, a crash occurs in "delete szInterface" if(isRar) //TODO: fix this!!! Possible memory leak. If AddRef is not used, a crash occurs in "delete szInterface"
szInterface->archive->AddRef(); szInterface->archive->AddRef();
#endif #endif
if(valid) //TODO: fix this!!! Memory leak. if(valid) //TODO: fix this!!! Memory leak.
{
szInterface->archive->Close();
delete szInterface; delete szInterface;
}
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
delete rarLib; delete rarLib;
#endif #endif