Michael, Can you mock up a more complete example of what you are trying to do?
I am a little worried about the lifecycle of objects allocated that way, about who owns them, and what happens to the memory. From my casual look at it, Jelmer's code is pretty clever but I am not sure calling R's new() to allocate inside of what you consider a C++ object might be too clever by half and hurt you later. Rcpp::XPtr() will always fit in the framework of .Call() functions receiving and returning SEXP. On the other hand, Rcpp modules are very useful, but also known to have limits as eg the lack of serialization/deserialization for load and save. Dirk -- "Outside of a dog, a book is a man's best friend. Inside of a dog, it is too dark to read." -- Groucho Marx _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
