I'm a noob in Rcpp programming and here is a simple question for Rcpp. Will it double the memory cost when using 'as' function in Rcpp? Take the following rough codes for an example, 'x' is a very big matrix. I am wondering if 'xx' and 'x' share the same memory or just copy a new memory from 'x'?
void test(SEXP x){
arma::mat xx = as<arma::mat>(x);
}