diff options
Diffstat (limited to 'lib/system')
-rwxr-xr-x | lib/system/gc.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index 351f0df9b..f56821180 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -517,6 +517,12 @@ proc gcMark(gch: var TGcHeap, p: pointer) {.inline.} = # mark the cell: cell.refcount = cell.refcount +% rcIncrement add(gch.decStack, cell) + # care for string->cstring and seq->openArray conversions: + var b = cast[PCell](c -% sizeof(TGenericSeq)) + if isAllocatedPtr(gch.region, b): + # mark the cell: + b.refcount = b.refcount +% rcIncrement + add(gch.decStack, b) proc markThreadStacks(gch: var TGcHeap) = when hasThreadSupport and hasSharedHeap: |