From 9bb11a48a672f20a4c0b7d1bb327ac08dc5ab4b8 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 31 Jan 2013 19:55:11 +0100 Subject: [PATCH] fixed embarrassing memory leak in 'collectCycles' --- lib/system/gc.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/system/gc.nim b/lib/system/gc.nim index ec656e0efc..5405948ebc 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: