diff options
Diffstat (limited to 'tests/destructor/smart_ptr.nim')
-rw-r--r-- | tests/destructor/smart_ptr.nim | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/destructor/smart_ptr.nim b/tests/destructor/smart_ptr.nim index 7c3141d22..5079dc9db 100644 --- a/tests/destructor/smart_ptr.nim +++ b/tests/destructor/smart_ptr.nim @@ -20,12 +20,6 @@ proc `=`*[T](dest: var SharedPtr[T], src: SharedPtr[T]) {.inline.} = discard atomicInc(src.val[].atomicCounter) dest.val = src.val -proc `=sink`*[T](dest: var SharedPtr[T], src: SharedPtr[T]) {.inline.} = - if dest.val != src.val: - if dest.val != nil: - `=destroy`(dest) - dest.val = src.val - proc newSharedPtr*[T](val: sink T): SharedPtr[T] = result.val = cast[type(result.val)](allocShared0(sizeof(result.val[]))) result.val.atomicCounter = 1 |