switch to release

This commit is contained in:
Jaremy Creechley 2023-09-14 19:58:31 -07:00
parent fe9b6ebc67
commit 7960ed9786
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -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[])):