From b32da633e09feeabc336efe54faa2a8c55b6abb4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sat, 1 Jun 2013 14:27:45 +0200 Subject: [PATCH] valgrind support: Destroy mempool when memoryManager is destroyed Fixes "impossible situation!" abort in valgrind when running tests that create and destroy a lot of engines. Change-Id: I58cfd2380b0149d25ebecdb270be428ec6b8a64f Reviewed-by: Lars Knoll --- src/qml/qml/v4/qv4mm.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qml/qml/v4/qv4mm.cpp b/src/qml/qml/v4/qv4mm.cpp index 4386382..c3942a9 100644 --- a/src/qml/qml/v4/qv4mm.cpp +++ b/src/qml/qml/v4/qv4mm.cpp @@ -472,6 +472,9 @@ MemoryManager::~MemoryManager() } sweep(); +#ifdef V4_USE_VALGRIND + VALGRIND_DESTROY_MEMPOOL(this); +#endif } void MemoryManager::protect(Managed *m) -- 2.7.4