summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-01-31 19:55:11 +0100
committerAraq <rumpf_a@web.de>2013-01-31 19:55:11 +0100
commit9bb11a48a672f20a4c0b7d1bb327ac08dc5ab4b8 (patch)
tree91becc8bb1534e5543980de60bdfa4432fed53f7
parentf96d612e980af065217cddaf0a8521189977a37b (diff)
downloadNim-9bb11a48a672f20a4c0b7d1bb327ac08dc5ab4b8.tar.gz
fixed embarrassing memory leak in 'collectCycles'
-rw-r--r--lib/system/gc.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index ec656e0ef..5405948eb 100644
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -575,6 +575,7 @@ proc collectCycles(gch: var TGcHeap) =
           d.refcount = d.refcount +% rcIncrement
           if d in gch.cycleRoots and not containsOrIncl(marker, d):
             forAllChildren(d, waPush)
+  Deinit(marker)
   # remove cycles:
   for c in elements(gch.cycleRoots):
     if c.refcount <% rcIncrement: