Files
MapLibreParticleLab/test/util/thread_local.test.cpp
Thiago Marcos P. Santos 48ddfef89f [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`.
2017-07-14 15:18:54 +03:00

2.5 KiB