From 7960ed978690f40e5f8d3ebc9ac6d220994a4e6a Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Thu, 14 Sep 2023 19:58:31 -0700 Subject: [PATCH] switch to release --- datastore/threads/sharedptr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastore/threads/sharedptr.nim b/datastore/threads/sharedptr.nim index 7ebc08d..d9eb168 100644 --- a/datastore/threads/sharedptr.nim +++ b/datastore/threads/sharedptr.nim @@ -57,7 +57,7 @@ proc incr*[T](a: SharedPtr[T]) = proc decr*[T](x: SharedPtr[T]) = if x.container != nil: - let res = atomicSubFetch(addr x.container.cnt, 1, ATOMIC_ACQUIRE) + let res = atomicSubFetch(addr x.container.cnt, 1, ATOMIC_RELEASE) if res == 0: echoed "SharedPtr: FREE: ", x.container.pointer.repr, " cnt: ", x.container.cnt, " tp: ", $(typeof(T)) when compiles(`=destroy`(x[])):