I think you are looking for GC_ref() and GC_unref() pair from system module. 
For Nim's ref values (managed pointers) applying GC_ref() blocks the Nim memory 
management system from freeing the data, and later GC_unref() allows it again.

Reply via email to