As to your question regarding `GCunref`, **yes** , it is needed for objects managed by Nim's GC (like the string example in the manual) when an untraced object (`ptr`) points to a traced object (`ref`) as you have in your example.
You also need to be careful here. Your intention appears to be sharing this untraced object across threads (given the usage of `allocShared0`) and you are mixing GC'ed memory with non-GC'ed memory across threads, which is tricky at best (read: unsafe). You need to understand and control the lifecycle of the GC'ed objects in order to avoid unsafe behavior. My general advice would be to avoid doing that. If it helps steer you towards a better solution, I'll mention that in the past I created a string type called `SharedString` (named in the spirit of `allocShared`) which can be easily initialized from the standard `string` type, as well as manipulated much like a normal string (using converters) but ends up using global shared storage instead of GC'ed memory. See [this gist](https://gist.github.com/aboisvert/0791b53e492ebc4020c4e1cc049d539d).
