diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-04-23 21:57:06 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-10 11:41:00 +0000 |
commit | 5d5343a6bc02c0df3723cb9650067e972aebe8ff (patch) | |
tree | 624aca781e8bd3a095bbaeef972c9b994727116c /src/qml/qml/qqmlabstractbinding.cpp | |
parent | 9de77e056583b0bcfd7e17d855ac8956847c58eb (diff) |
Save one more pointer on each binding
Fold the isAddedToObject flag into the nextBinding pointer.
Reorder the members to avoid holes in the data.
Change-Id: I0a216940f52020a5d48a6ed05cc236c248161b08
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlabstractbinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlabstractbinding.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlabstractbinding.cpp b/src/qml/qml/qqmlabstractbinding.cpp index 0d281b7750..4e0763e95a 100644 --- a/src/qml/qml/qqmlabstractbinding.cpp +++ b/src/qml/qml/qqmlabstractbinding.cpp @@ -40,9 +40,7 @@ QT_BEGIN_NAMESPACE QQmlAbstractBinding::QQmlAbstractBinding() - : m_nextBinding(0), - m_targetIndex(-1), - m_isAddedToObject(false) + : m_targetIndex(-1) { Q_ASSERT(!isAddedToObject()); } @@ -51,6 +49,9 @@ QQmlAbstractBinding::~QQmlAbstractBinding() { Q_ASSERT(!ref); Q_ASSERT(!isAddedToObject()); + + if (m_nextBinding.data() && !m_nextBinding->ref.deref()) + delete m_nextBinding.data(); } /*! |