This commit is contained in:
Araq 2011-03-12 12:38:42 +01:00
commit 6850fb73c1
8 changed files with 132 additions and 75 deletions

View file

@ -7,5 +7,5 @@ proc MakeObj(): TTestObj =
while true:
var obj = MakeObj()
# echo GC_getstatistics()

20
tests/gc/gcleak2.nim Normal file
View file

@ -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()