From 768f606cd3cd37c235e85225127201a42d272946 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Thu, 17 Aug 2017 09:49:25 +0300 Subject: Fix memory leaks with threaded renderer Reverts 39061af50cc3092289cdd71d17802139590ecb59 and calls endSync() instead after syncSceneGraph(). Task-number: QTBUG-61754 Change-Id: I7b51ffdc93557bacd93927dd642ec3715980b21c Reviewed-by: Laszlo Agocs Reviewed-by: Roger Zanoni --- src/quick/scenegraph/util/qsgatlastexture.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/quick/scenegraph/util/qsgatlastexture.cpp') diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index d5f836a525..22f0b13f46 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -116,7 +116,7 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel) Texture *t = 0; if (image.width() < m_atlas_size_limit && image.height() < m_atlas_size_limit) { if (!m_atlas) - m_atlas = new Atlas(m_atlas_size, this); + m_atlas = new Atlas(m_atlas_size); // t may be null for atlas allocation failure t = m_atlas->create(image); if (t && !hasAlphaChannel && t->hasAlphaChannel()) @@ -125,9 +125,8 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel) return t; } -Atlas::Atlas(const QSize &size, QObject *parent) - : QObject(parent) - , m_allocator(size) +Atlas::Atlas(const QSize &size) + : m_allocator(size) , m_texture_id(0) , m_size(size) , m_atlas_transient_image_threshold(0) -- cgit v1.2.3