Don't cast to refs, strings or sequences, those types are tracked by the garbage collector and the cast will not register those pointers with the garbage collector.
Also I'm surprised you can have a typedesc field as in: type ListClass = ref object typ : typedesc pointR : ByteAddress Run