[Rcpp-devel] Trouble passing arguments to R functions that have been passed in (maybe)

Dirk Eddelbuettel edd at debian.org
Mon Sep 10 23:05:46 CEST 2012


On 10 September 2012 at 21:23, Anthony Lee wrote:
| It seems to be the casethat when the memory issue occurs, garbage 
| collection has just been called by R, at least according to gcinfo.In 
| particular, it is called when bar is called and cleans up the arguments 
| that bar is about to use, thus causing a problem.
| 
| Is there a way to ensure the safety of the arguments that are sent back 
| to R?

I didn't have a lot of time for your post but I suspect your design is broken
if you plan to call an R function in each itereation of a C++ loop.

Just because you can does not mean you should.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list