From: Vincent Pit Date: Thu, 14 May 2015 20:07:27 +0000 (+0200) Subject: Destroy the op map mutex at end time X-Git-Tag: v0.15~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=bd9cc78d8eb99ee814a21fe46e981387dd3bca80;p=perl%2Fmodules%2Fautovivification.git Destroy the op map mutex at end time --- diff --git a/autovivification.xs b/autovivification.xs index 528b13b..0ca1714 100644 --- a/autovivification.xs +++ b/autovivification.xs @@ -1570,6 +1570,10 @@ static void a_teardown(pTHX_ void *root) { ptable_map_free(a_op_map); a_op_map = NULL; + +#ifdef USE_ITHREADS + MUTEX_DESTROY(&a_op_map_mutex); +#endif } A_LOADED_UNLOCK; @@ -1604,6 +1608,7 @@ static void a_setup(pTHX) { PERL_HASH(a_hash, __PACKAGE__, __PACKAGE_LEN__); a_op_map = ptable_new(); + #ifdef USE_ITHREADS MUTEX_INIT(&a_op_map_mutex); #endif