code cleanup for mark&sweep GC

This commit is contained in:
Araq 2013-02-07 16:09:46 +01:00
commit 4ee9816a78
7 changed files with 43 additions and 88 deletions

View file

@ -15,7 +15,9 @@ proc MakeObj(): TTestObj =
result.s = @[1,2,3]
proc inProc() =
for i in 1 .. 100_000_000:
for i in 1 .. 1_000_000:
when defined(gcMarkAndSweep):
GC_fullcollect()
var obj: TTestObj
obj = MakeObj()
if getOccupiedMem() > 300_000: quit("still a leak!")