Skip to content
Prev 47331 / 63424 Next

External pointers and changing SEXPTYPE

Hi, 

One solution to protect an object from the GC is to use the R_PreserveObject and R_ReleaseObject functions. 

This way, you are not subject to the stack that PROTECT, UNPROTECT, UNPROTECT_PTR uses. 

Using R_PreserveObject and R_ReleaseObject is one of the best things that has ever happened to Rcpp. 

Romain

Le 16 d?c. 2013 ? 12:07, Krzysztof Mlynarczyk <mitomaster at gmail.com> a ?crit :