delete pthread key at shutdown, PR #810 by @jkriegshauser

This commit is contained in:
Daan 2024-03-02 15:51:51 -08:00
parent 944ec1ab8a
commit 7b398ad924

View file

@ -829,7 +829,9 @@ void _mi_prim_thread_init_auto_done(void) {
} }
void _mi_prim_thread_done_auto_done(void) { void _mi_prim_thread_done_auto_done(void) {
// nothing to do if (_mi_heap_default_key != (pthread_key_t)(-1)) { // do not leak the key, see issue #809
pthread_key_delete(_mi_heap_default_key);
}
} }
void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) { void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {