summary refs log tree commit diff stats
path: root/tests/gc/gcleak.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gc/gcleak.nim')
-rw-r--r--tests/gc/gcleak.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/gc/gcleak.nim b/tests/gc/gcleak.nim
new file mode 100644
index 000000000..88aeda56d
--- /dev/null
+++ b/tests/gc/gcleak.nim
@@ -0,0 +1,11 @@
+type
+  TTestObj = object of TObject
+    x: string
+
+proc MakeObj(): TTestObj =
+  result.x = "Hello"
+
+while true:
+  var obj = MakeObj()
+
+