]> git.vpit.fr Git - perl/modules/autovivification.git/commitdiff
Destroy the op map mutex at end time
authorVincent Pit <vince@profvince.com>
Thu, 14 May 2015 20:07:27 +0000 (22:07 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 14 May 2015 20:07:27 +0000 (22:07 +0200)
autovivification.xs

index 528b13bb8a779936b5e27286be3e6ee0944bff8d..0ca1714b8440bbe13ed9b88993255aa2ad9f9cee 100644 (file)
@@ -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