Skip to main content

root_owned

Function root_owned 

Source
pub(crate) fn root_owned(sexp: SEXP) -> ProtectKey
Expand description

Root an owning handle’s EXTPTRSXP in the main-thread pool.

Must run on R’s main thread, which holds inside create_extptr_sexp[_unchecked] and TraitViewData::new, whose trait views root their receiver here too. sexp may be fresh: it stays reachable while the first call creates the pool and while the pool grows.