Message-ID: <BB5D64C0-C5A1-49B1-A07E-5E2039D4BEF3@uzh.ch>
Date: 2011-05-22T10:55:27Z
From: soeren.vogel at uzh.ch
Subject: [Rcpp-devel] R CMD BATCH - segfault (was: Create and access several instances of a C++ class from R)
In-Reply-To: <BANLkTi=to9Q3CEXL9ezhhZsdjhXxx1Mn+A@mail.gmail.com>
On 20.05.2011, at 17:26, Douglas Bates wrote:
On Fri, May 20, 2011 at 5:01 AM, <soeren.vogel at uzh.ch> wrote:
> On 18.05.2011, at 15:17, Douglas Bates wrote:
>
>> As you can see, the problem occurs when R is saving the worksheet. At
>> present an instance of a Rcpp module class cannot be saved. It is likely
>> that this will need to be addressed by the person designing each C++ class
>> that will be expressed in a module. R can't serialize the contents of
>> memory that it doesn't "own".
>>
>> The current fix is "don't do that". Add the --no-save or --vanilla in your
>> call to R CMD BATCH to suppress saving the worksheet.
Hello
Just to get that clearly: Whatever I do with a C++ class in one session will be lost after quit? So, that would mean, to save my current work (done with an Rcpp module class) requires me to write a representation of the c++ object in R, which can be saved and which, after reload, rebuilds the last state of R affairs? Guessing that, my conclusion would be to not expose the Rcpp module class, rather to build an R class which rests upon the C++ stuff and holds the important information. That in turn would mean almost double use of memory? Or how would you recommend to work around?
Thanks
S?ren + Carlo