diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2016-09-09 16:20:57 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-10-06 14:46:21 +0000 |
commit | 57c9d6969ac474177c77d5ea59768b39620a3b2f (patch) | |
tree | d7fab7663b43af13f7551e9360a588594b7d21cf /src/qml/qml/qqmlxmlhttprequest.cpp | |
parent | 6c05fe9cb760a9a26d7a1a8037aa62966a3bd344 (diff) |
QML: Also check for correct destroy() chaining
Check that the destroy() method of Heap::Base was called when a Managed
object needs destruction. This checks if a call to the parent's
destroy() method was accidentally omitted.
Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index fe2d7da694..f94946820f 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -179,6 +179,7 @@ struct NamedNodeMap : Object { delete listPtr; if (d) d->release(); + Object::destroy(); } QList<NodeImpl *> &list() { if (listPtr == nullptr) @@ -195,6 +196,7 @@ struct NodeList : Object { void destroy() { if (d) d->release(); + Object::destroy(); } NodeImpl *d; }; @@ -208,6 +210,7 @@ struct Node : Object { void destroy() { if (d) d->release(); + Object::destroy(); } NodeImpl *d; }; @@ -1605,6 +1608,7 @@ struct QQmlXMLHttpRequestWrapper : Object { void destroy() { delete request; + Object::destroy(); } QQmlXMLHttpRequest *request; }; |