On 27 August 2012 at 22:26, Darren Cook wrote: | > I was not aware that two instances of R are active at the same time. | > It was my expectation that by instantiating the RInside class as a | > local variable, at the end of foo() the destructor R.~RInside() would | > be called and the encapsulated R instance would be terminated, before | > a new one is instantiated in bar(). | | That does seem reasonable :-)
Sure. "In theory, theory and practice are the same. In practice they are not." Fingers are pointing to the R end of things, rather than the RInside wrapping of it. If this can be improved, great. | > I don't think that it is proper to modify main() | > with the unit testing framework that I'm using (gtest), as the tests | > are discovered without explicitly calling them from main(). | | I assume there must be a "nothing we can do about" reason why RInside | works the way it does. So I wonder if you can create a global RInside | instance using a global test environment call? | | http://code.google.com/p/googletest/wiki/AdvancedGuide#Global_Set-Up_and_Tear-Down One global instance is also what I do in the Qt embedding example. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel