diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-12-10 16:44:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-10 16:44:54 +0100 |
commit | b8152b29e8b7274eef62f3252dfe8f2cce8adb8a (patch) | |
tree | defc1d20dae7883d7fdbdb3bdebbf9d3fdf4a3a3 /tests/destructor | |
parent | 56cf3403b48943fe1fbc26377669d7d69fde4878 (diff) | |
download | Nim-b8152b29e8b7274eef62f3252dfe8f2cce8adb8a.tar.gz |
ARC: yet another bugfix (#12871)
Diffstat (limited to 'tests/destructor')
-rw-r--r-- | tests/destructor/tarc.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/destructor/tarc.nim b/tests/destructor/tarc.nim index 5c78605d2..25921ffd7 100644 --- a/tests/destructor/tarc.nim +++ b/tests/destructor/tarc.nim @@ -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 |