Is there a way to check the state of a **ref object** before it is demolished
by the garbage collector?
type
A = ref object
count: int
proc finalize(o: A) =
echo "count: " & $o.count # shows "count: 0" instead of "count: 555"
var a = A(count: 555)
new(a, finalize)
a = nil
GC_fullCollect()
Run
