aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-23 18:26:50 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-23 18:19:57 +0000
commit9c4621217f47b8427e284423d4e5c5e4dba00bfc (patch)
tree50c2cc2fddfdb1c6c5432fa1a8aeae3251a0d7e3 /src/qml/memory
parent7842c2c19c16e6d52d1b138fb33ee563bae0faae (diff)
Revert "Fix QtSharedPointer::ExternalRefCountData object leaks"
This reverts commit 839d2d3e2368bc8e107d22203b0611c852f54319, which has been causing crashes in qtquickcontrols2 auto tests and making it nearly impossible to integrate anything over the past few days. Change-Id: I570b286a067aae5e3c2d8c56ad601e1a6cb58c20 Task-number: QTBUG-50134 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/memory')
-rw-r--r--src/qml/memory/qv4mm.cpp11
-rw-r--r--src/qml/memory/qv4mm_p.h2
2 files changed, 2 insertions, 11 deletions
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 053dfb856c..5181bf912b 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -41,6 +41,8 @@
#include "StdLibExtras.h"
#include <QTime>
+#include <QVector>
+#include <QVector>
#include <QMap>
#include <iostream>
@@ -435,15 +437,6 @@ void MemoryManager::sweep(bool lastSweep)
(*it) = Primitive::undefinedValue();
}
- // Some QV4::QObjectWrapper objects will be removed from PersistentValueStorage in WeakValue::~WeakValue()
- // before MemoryManager::sweep() is being called, in this case we will never have a chance to call detroyObject()
- // on those QV4::QObjectWrapper objects. Here we call detroyObject() for each pending destroyed Heap::QObjectWrapper
- // object on the heap to make sure that we can release all the resources held by them
- for (QVector<Heap::QObjectWrapper *>::const_iterator it = m_pendingDestroyedObjectWrappers.constBegin();
- it != m_pendingDestroyedObjectWrappers.constEnd(); ++it)
- QObjectWrapper::destroyObject(*it, lastSweep);
- m_pendingDestroyedObjectWrappers.clear();
-
if (MultiplyWrappedQObjectMap *multiplyWrappedQObjects = engine->m_multiplyWrappedQObjects) {
for (MultiplyWrappedQObjectMap::Iterator it = multiplyWrappedQObjects->begin(); it != multiplyWrappedQObjects->end();) {
if (!it.value().isNullOrUndefined())
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index 69aae1c5bf..3543da0907 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -49,7 +49,6 @@
#include <private/qv4value_p.h>
#include <private/qv4scopedvalue_p.h>
#include <private/qv4object_p.h>
-#include <QVector>
//#define DETAILED_MM_STATS
@@ -328,7 +327,6 @@ public:
QScopedPointer<Data> m_d;
PersistentValueStorage *m_persistentValues;
PersistentValueStorage *m_weakValues;
- QVector<Heap::QObjectWrapper *> m_pendingDestroyedObjectWrappers;
};
}