fixes #20
This commit is contained in:
parent
0fee9f9924
commit
6850fb73c1
8 changed files with 132 additions and 75 deletions
|
|
@ -7,5 +7,5 @@ proc MakeObj(): TTestObj =
|
|||
|
||||
while true:
|
||||
var obj = MakeObj()
|
||||
|
||||
# echo GC_getstatistics()
|
||||
|
||||
|
|
|
|||
20
tests/gc/gcleak2.nim
Normal file
20
tests/gc/gcleak2.nim
Normal 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()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue