fixed embarrassing memory leak in 'collectCycles'
This commit is contained in:
parent
f96d612e98
commit
9bb11a48a6
1 changed files with 1 additions and 0 deletions
|
|
@ -575,6 +575,7 @@ proc collectCycles(gch: var TGcHeap) =
|
||||||
d.refcount = d.refcount +% rcIncrement
|
d.refcount = d.refcount +% rcIncrement
|
||||||
if d in gch.cycleRoots and not containsOrIncl(marker, d):
|
if d in gch.cycleRoots and not containsOrIncl(marker, d):
|
||||||
forAllChildren(d, waPush)
|
forAllChildren(d, waPush)
|
||||||
|
Deinit(marker)
|
||||||
# remove cycles:
|
# remove cycles:
|
||||||
for c in elements(gch.cycleRoots):
|
for c in elements(gch.cycleRoots):
|
||||||
if c.refcount <% rcIncrement:
|
if c.refcount <% rcIncrement:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue