aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickshadereffect.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-17 17:09:10 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-03-19 20:00:17 +0000
commitb1f11207044d0c693101665d6457984615e3c406 (patch)
tree8e322ecebc8b5409cbeb9345f8266c9a1997bffa /src/quick/items/qquickshadereffect.cpp
parenta07c1c82d0ef1c0fff73acb2ee354a16e21b65dc (diff)
Use unique_ptr to clarify ownership of QQuickDefaultClipNode objects
The clang static analyzer warns in 3df1fff15a10a64372ed4f92ba05271f about a potential memory leak. While that particular claim is a false positive (the loop is always entered if sortedIndex is not empty), the re-use of the currentClipNode variable makes it hard to follow the object ownership, and there might still be a potential memory leak. Use std::unique_ptr to force explicit transfer of ownership, and get implicit destruction of objects not owned at the end of the scope. Change-Id: If826e1d81b92f1da60aae2262b628dcaaa2e592a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 02c6e7bc3aca42a188b772aa9794b919e60017e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/items/qquickshadereffect.cpp')
0 files changed, 0 insertions, 0 deletions