ARC: yet another bugfix (#12871)

This commit is contained in:
Andreas Rumpf 2019-12-10 16:44:54 +01:00 • committed by GitHub
commit b8152b29e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 25 deletions

View file

@ -82,6 +82,16 @@ proc inheritanceBug(param: string) =
s[0] = B(more: "a" & param)
s[1] = B(more: "a" & param)
type
PAsyncHttpServer = ref object
value: string
proc serve(server: PAsyncHttpServer) = discard
proc leakObjConstr =
serve(PAsyncHttpServer(value: "asdas"))
let startMem = getOccupiedMem()
take3()
tlazyList()
@ -89,4 +99,5 @@ inheritanceBug("whatever")
mkManyLeaks()
tsimpleClosureIterator()
tleakingNewStmt()
leakObjConstr()
echo getOccupiedMem() - startMem