diff options
author | Andy Shaw <andy.shaw@digia.com> | 2014-06-24 14:01:35 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2014-07-24 13:36:36 +0200 |
commit | 593fb0bad1f8e3d982ac818708dcaa069c656b07 (patch) | |
tree | 04fa181407d072232c6c508ee6d139a826a3a75a /src/quick | |
parent | 1416e6bd3ec4aaefe33bb64c9ad64d251f7f2885 (diff) |
Clean up the textures when deleting the content
Whenever the content is deleted then the textures will be recreated so the
existing list of textures should be deleted and cleared to reclaim the
memory.
Change-Id: I4fdf77817a5f4b2330414e9d113c669d18de9af8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquicktextnode.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp index da0d9cd714..02e321dfba 100644 --- a/src/quick/items/qquicktextnode.cpp +++ b/src/quick/items/qquicktextnode.cpp @@ -303,6 +303,8 @@ void QQuickTextNode::deleteContent() while (firstChild() != 0) delete firstChild(); m_cursorNode = 0; + qDeleteAll(m_textures); + m_textures.clear(); } #if 0 |