[app] Fixed a few memory leaks

This commit is contained in:
Slava Monich 2018-05-06 02:02:15 +03:00
parent c49d8af7a3
commit b78201060b
2 changed files with 7 additions and 3 deletions

View file

@ -123,11 +123,11 @@ void BooksPageWidget::ResetTask::performTask()
view->gotoPosition(iPosition); view->gotoPosition(iPosition);
if (!isCanceled()) { if (!isCanceled()) {
iData->iView = view; iData->iView = view;
} else { return;
delete view;
} }
} }
} }
delete view;
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2015-2017 Jolla Ltd. * Copyright (C) 2015-2018 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com> * Contact: Slava Monich <slava.monich@jolla.com>
* *
* You may use this file under the terms of the BSD license as follows: * You may use this file under the terms of the BSD license as follows:
@ -51,6 +51,8 @@
#include "time/ZLQtTime.h" #include "time/ZLQtTime.h"
#include "image/ZLQtImageManager.h" #include "image/ZLQtImageManager.h"
#include "iconv/IConvEncodingConverter.h" #include "iconv/IConvEncodingConverter.h"
#include "formats/xhtml/XHTMLReader.h"
#include "library/Tag.h"
#include <sailfishapp.h> #include <sailfishapp.h>
#include <MGConfItem> #include <MGConfItem>
@ -244,6 +246,8 @@ void ZLibrary::shutdown()
ZLFSManager::deleteInstance(); ZLFSManager::deleteInstance();
ZLTimeManager::deleteInstance(); ZLTimeManager::deleteInstance();
BooksStorageManager::deleteInstance(); BooksStorageManager::deleteInstance();
XHTMLReader::clearTagTable();
Tag::clearTags();
} }
void ZLibrary::initApplication(const std::string& aName) void ZLibrary::initApplication(const std::string& aName)