diff options
author | Araq <rumpf_a@web.de> | 2011-03-12 12:38:42 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-03-12 12:38:42 +0100 |
commit | 6850fb73c1b9ae8d3f56a61ee37922c3cb3788d6 (patch) | |
tree | 3454e74ca1e27fd6f39bfd2d1fd15e86cbbbb731 /tests/gc | |
parent | 0fee9f9924cbbb6b18191d9c731542feac1ac682 (diff) | |
download | Nim-6850fb73c1b9ae8d3f56a61ee37922c3cb3788d6.tar.gz |
fixes #20
Diffstat (limited to 'tests/gc')
-rw-r--r-- | tests/gc/gcleak.nim | 2 | ||||
-rw-r--r-- | tests/gc/gcleak2.nim | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/gc/gcleak.nim b/tests/gc/gcleak.nim index 88aeda56d..a44c16f59 100644 --- a/tests/gc/gcleak.nim +++ b/tests/gc/gcleak.nim @@ -7,5 +7,5 @@ proc MakeObj(): TTestObj = while true: var obj = MakeObj() - +# echo GC_getstatistics() diff --git a/tests/gc/gcleak2.nim b/tests/gc/gcleak2.nim new file mode 100644 index 000000000..5ab9da7c9 --- /dev/null +++ b/tests/gc/gcleak2.nim @@ -0,0 +1,20 @@ +type + TTestObj = object of TObject + x: string + s: seq[int] + +proc MakeObj(): TTestObj = + result.x = "Hello" + result.s = @[1,2,3] + +#while true: +# var obj = MakeObj() +# echo GC_getstatistics() + +proc inProc() = + while true: + var obj: TTestObj + obj = MakeObj() + +inProc() + |