News for hackers. Stuff that matters.
Re:Reference count, don't garbage collect by elcritch on Sunday July 31, 2022 @04:36PM (#32298600)
Nim does allow cycles and the new GC is non-atomic RC + cycle collector.

Though I’ve been hacking on a UI framework written in Nim. Its ui nodes form a tree structure that only tracks parent => child. When it needs the parent info it makes a stack of parents during processing.

Essentially it moves the cycle collector / GC work to extra work during processing. But it’s cheaper since you’re already accessing the memory.

There are no comments on this comment yet.