> I've got some questions as I'm trying to grok this. First, to make sure I > understand: unowned refs would need to be set to nil so the type based > allocater can free them, and owned refs will be automatically freed when they > leave the scope. Is that summary correct?
Not entirely, usually unowned refs are also discarded. The setting to nil only applies when the unowned ref outlives the owned ref. Maybe see [https://researcher.watson.ibm.com/researcher/files/us-bacon/Dingle07Ownership.pdf](https://researcher.watson.ibm.com/researcher/files/us-bacon/Dingle07Ownership.pdf) for more details. > If I create a owned ref and pass it to a proc that takes an owned ref, does > that mean that the context that created the ref no longer owns it? Yes. > And lastly, how would multi threading code change with this new feature? > Would the convention be to create owned refs and pass them from thread to > thread. Yes.
