From 0f247d8641b217f76a1c41e62633f9377b2cbe61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Fri, 24 Jun 2016 18:51:30 +0200 Subject: [PATCH] Added destructor to YACReaderHttpSession --- YACReaderLibrary/server/yacreader_http_session.cpp | 9 +++++++++ YACReaderLibrary/server/yacreader_http_session.h | 1 + 2 files changed, 10 insertions(+) diff --git a/YACReaderLibrary/server/yacreader_http_session.cpp b/YACReaderLibrary/server/yacreader_http_session.cpp index 22049735..24ad65d7 100644 --- a/YACReaderLibrary/server/yacreader_http_session.cpp +++ b/YACReaderLibrary/server/yacreader_http_session.cpp @@ -6,6 +6,15 @@ YACReaderHttpSession::YACReaderHttpSession(QObject *parent) } +YACReaderHttpSession::~YACReaderHttpSession() +{ + if(comic != nullptr) + delete comic; + + if(remoteComic != nullptr) + delete remoteComic; +} + bool YACReaderHttpSession::isComicOnDevice(const QString & hash) { return comicsOnDevice.contains(hash); diff --git a/YACReaderLibrary/server/yacreader_http_session.h b/YACReaderLibrary/server/yacreader_http_session.h index cc6a3131..7b1b677a 100644 --- a/YACReaderLibrary/server/yacreader_http_session.h +++ b/YACReaderLibrary/server/yacreader_http_session.h @@ -12,6 +12,7 @@ class YACReaderHttpSession : public QObject Q_OBJECT public: explicit YACReaderHttpSession(QObject *parent = 0); + ~YACReaderHttpSession(); void setComicsOnDevice(const QSet & set); void setComicOnDevice(const QString & hash);