[Rcpp-devel] Problem passing Armadillo objects back to R

Christian Gunning xian at unm.edu
Thu Apr 7 05:07:09 CEST 2011


> The issue is that when calling wrap it creates an unprotected SEXP, and
> Rcpp is not responsible for these. If the programmer passes an
> unprotected SEXP to ::create, it is his responsability to protect it.

Just to clarify -- in the case of a naive user who's not protecting
objects: a single wrap as the last call in a function is one case that
will *always* work as expected, correct? And when using more than one
wrap, later ones can *potentially* but not necessarily clobber earlier
ones, yes?

thanks,
-christian


-- 
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!


More information about the Rcpp-devel mailing list