From 48ddfef89ff4daa2e26d3338dbfc20c4f4cc7d21 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 13 Jul 2017 16:38:42 +0300 Subject: [core] Make sure ThreadLocal will not own the pointer it is managing ThreadLocal should not own the pointer it is managing because the use case in Mapbox GL is to keep a pointer to a stack allocated object, like: ``` MyObject foo; threadLocal.set(&foo); ``` To keep consistency, it is required that we clear the managed object before ThreadLocal gets destroyed by setting it to `nullptr`. --- scripts/valgrind.sup | 8 -------- 1 file changed, 8 deletions(-) (limited to 'scripts') diff --git a/scripts/valgrind.sup b/scripts/valgrind.sup index f659122dc1..09e2f6685c 100644 --- a/scripts/valgrind.sup +++ b/scripts/valgrind.sup @@ -76,11 +76,3 @@ fun:_ZN4mbgl4util10write_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ ... } -{ - Qt5 ThreadStorage - Memcheck:Leak - match-leak-kinds: definite - fun:_Znwm - fun:_Z24qThreadStorage_localDataISt5arrayIPiLm1EEERT_R18QThreadStorageDataPS3_.isra.5 - ... -} -- cgit v1.2.1