arc allocation method aligned (#15588)

* progress

* fix typo
This commit is contained in:
cooldome 2020-10-19 13:50:06 +01:00 • committed by GitHub
commit 833035bacd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 85 additions and 41 deletions

View file

@ -248,9 +248,7 @@ proc genericReset(dest: pointer, mt: PNimType) =
unsureAsgnRef(cast[PPointer](dest), nil)
of tySequence:
when defined(nimSeqsV2):
var s = cast[ptr NimSeqV2Reimpl](dest)
if s.p != nil:
deallocShared(s.p)
frees(cast[ptr NimSeqV2Reimpl](dest)[])
zeroMem(dest, mt.size)
else:
unsureAsgnRef(cast[PPointer](dest), nil)