Honestly I don't know. I try to avoid `ref` as much as I try to avoid
`std::shared_ptr` in C++ because for me they are semantically the same. But I
know that the programming language Go does not have distinct types for `ref`
and `ptr`. In that language a pointer simply keeps a block of memory during
garbage collection alive, when the Go runtime knows about that pointer, and the
pointer points to the garbage collected region of memory. A pointer to memory
outside of the GC heap simply doesn't affect the garbage collector. Could be
that Nim behaves similarly.