diff options
author | Araq <rumpf_a@web.de> | 2013-01-31 19:55:11 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-01-31 19:55:11 +0100 |
commit | 9bb11a48a672f20a4c0b7d1bb327ac08dc5ab4b8 (patch) | |
tree | 91becc8bb1534e5543980de60bdfa4432fed53f7 | |
parent | f96d612e980af065217cddaf0a8521189977a37b (diff) | |
download | Nim-9bb11a48a672f20a4c0b7d1bb327ac08dc5ab4b8.tar.gz |
fixed embarrassing memory leak in 'collectCycles'
-rw-r--r-- | lib/system/gc.nim | 1 |
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: |