valgrind support: Destroy mempool when memoryManager is destroyed
authorSimon Hausmann <simon.hausmann@digia.com>
Sat, 1 Jun 2013 12:27:45 +0000 (14:27 +0200)
committerLars Knoll <lars.knoll@digia.com>
Sun, 2 Jun 2013 13:12:24 +0000 (15:12 +0200)
Fixes "impossible situation!" abort in valgrind when running tests that
create and destroy a lot of engines.

Change-Id: I58cfd2380b0149d25ebecdb270be428ec6b8a64f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/v4/qv4mm.cpp

index 4386382..c3942a9 100644 (file)
@@ -472,6 +472,9 @@ MemoryManager::~MemoryManager()
     }
 
     sweep();
+#ifdef V4_USE_VALGRIND
+    VALGRIND_DESTROY_MEMPOOL(this);
+#endif
 }
 
 void MemoryManager::protect(Managed *m)