From: jian liang Date: Sun, 22 Feb 2015 04:27:05 +0000 (+0800) Subject: Fix memory leak of QSGContext object in QSGThreadedRenderLoop X-Git-Tag: v5.5.90+alpha1~3^2~29^2^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06ff96d49159274aa47584db58c5451f28f1cb36;p=platform%2Fupstream%2Fqtdeclarative.git Fix memory leak of QSGContext object in QSGThreadedRenderLoop Add destructor for QSGThreadedRenderLoop to destory QSGContext object. Change-Id: I479947eb35a5d7888d45655a9b8e2ece5e30bc33 Reviewed-by: Gunnar Sletta --- diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 155b52b..561ebff 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -703,6 +703,11 @@ QSGThreadedRenderLoop::QSGThreadedRenderLoop() m_animation_driver->install(); } +QSGThreadedRenderLoop::~QSGThreadedRenderLoop() +{ + delete sg; +} + QSGRenderContext *QSGThreadedRenderLoop::createRenderContext(QSGContext *sg) const { return sg->createRenderContext(); diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h index 82f314a..1039807 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h +++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h @@ -49,6 +49,7 @@ class QSGThreadedRenderLoop : public QSGRenderLoop Q_OBJECT public: QSGThreadedRenderLoop(); + ~QSGThreadedRenderLoop(); void show(QQuickWindow *) {} void hide(QQuickWindow *);