ARC: fixes leaking new() statement (#12665)
This commit is contained in:
parent
107b40f097
commit
76179cbec2
3 changed files with 24 additions and 8 deletions
|
|
@ -43,9 +43,18 @@ proc tlazyList =
|
|||
var x = LazyList(c: proc () = echo(dep))
|
||||
x.c()
|
||||
|
||||
type
|
||||
Foo = ref object
|
||||
|
||||
proc tleakingNewStmt =
|
||||
var x: Foo
|
||||
for i in 0..10:
|
||||
new(x)
|
||||
|
||||
let startMem = getOccupiedMem()
|
||||
tlazyList()
|
||||
|
||||
mkManyLeaks()
|
||||
tsimpleClosureIterator()
|
||||
tleakingNewStmt()
|
||||
echo getOccupiedMem() - startMem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue