so, the Parser hands a struct off to an Observer, which copies various things into local vars then sends all those to ruby code
"one pointer in existence" is ownership but it would be unacceptably unergonomic without borrowing.
-
-
you can think of borrowing as "I give you ownership for the lifetime of your stack frame and you return it"
-
but it just looks like fn foo(o: &Observer) and the semantics take care of the dance.
-
my situation is I'm giving data to a callee that might not return, and the data should be freed and un-referenced after use
-
which means some nasty interleaved copying and freeing in the *callee*, which feels horrible, maybe there's a better way
-
so I get the pointer, null out my copy of it, pass the pointer to the callee, and *that* frees it between copying into a ruby string
-
> and yielding to the application. feels like an ownership transfer
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.