I don't know what "protect" the json means. I looked in the manual, it doesn't mention a protect statement. I'm also not entirely sure about "dispose", the word "dispose" doesn't appear in the manual, but I know there's a dispose statement that ignores a return value. But I don't see where that comes in. I also don't know what it means to "wrap a dispose in a ref." Long story short: you lost me.
But there are two more things I don't understand: 1\. If the json is stored in a thread-local heap, then I let other threads reference the json, those other threads are going to tend to touch the refcounts. But the refcounts, presumably, aren't atomic ints. How do I avoid accidentally trashing the refcounts? 2\. The compiler is trying very hard to prevent me from passing a ref to the json from the thread that created it to any other thread. (That's what gc-safe is all about). But as you mentioned before, I can force it with a cast. Is that part of the solution you're suggesting? Edit: I found a protect and a dispose in the system module. They're clearly intended for something having to do with referencing data across heaps, but I just haven't been able to intuit the details. Apparently, dispose doesn't do what I thought it did.
