[Rcpp-devel] Range constructor and memory allocation
Dirk Eddelbuettel
edd at debian.org
Wed Feb 19 12:50:10 CET 2014
On 19 February 2014 at 09:53, Gregor Kastner wrote:
| To sum up:
|
| R ----(reuse)----> Rcpp ----(reuse)----> RcppArmadillo
|
| but
|
| RcppArmadillo ----(fresh)----> Rcpp ----(reuse)----> R
|
| Correct?
I think so.
And the dreaded '(fresh)' in the second line may be hard to avoid. We need
to create R objects managed by R's memory management facilities -- once we
return something to R, it treats it like an object it created. That makes
external re-use somewhat difficult per my reading of Writing R Extensions.
If you can think of another way I'd be all ears.
Cheers, Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list