summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/destructor/tlists.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/destructor/tlists.nim b/tests/destructor/tlists.nim
index a9c78ab75..78c09b105 100644
--- a/tests/destructor/tlists.nim
+++ b/tests/destructor/tlists.nim
@@ -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