Dominick,
On 30/04/10 18:40, Dominick Samperi wrote:
Just to be sure that I understand, are you suggesting that the R-safe way to
do
things is to not use STL, and to not use C++ memory management and
exception handling? How can you leave a function in an irregular way without
triggering a
Simon,
Le 30/04/10 20:12, Simon Urbanek a écrit :
Dominick,
On Apr 30, 2010, at 1:40 PM, Dominick Samperi wrote:
Just to be sure that I understand, are you suggesting that the R-safe way to do
things is to not use STL, and to not use C++ memory management and exception
handling? How can
On Sat, May 1, 2010 at 5:02 AM, Romain Francois
romain.franc...@dbmail.com wrote:
Simon,
Le 30/04/10 20:12, Simon Urbanek a écrit :
Thank you for these nuggets of information. It might be beneficial to
promote them to some notes in the Interfacing C++ code section of WRE.
The manual is also
On Fri, 30 Apr 2010, Dominick Samperi wrote:
The R docs say that there are two methods that the C programmer can
allocate memory, one where R automatically frees the memory on
return from .C/.Call, and the other where the user takes responsibility
for freeing the storage. Both methods involve
Brian's answer was pretty exhaustive - just one more note that is indirectly
related to memory management: C++ exception handling does interfere with R's
error handling (and vice versa) so in general STL is very dangerous and best
avoided in R. In addition, remember that regular local object
Simon,
Just to be sure that I understand, are you suggesting that the R-safe way to do
things is to not use STL, and to not use C++ memory management and
exception handling? How can you leave a function in an irregular way without
triggering a seg fault or something like that, in which case there
Dominick,
On Apr 30, 2010, at 1:40 PM, Dominick Samperi wrote:
Just to be sure that I understand, are you suggesting that the R-safe way to
do things is to not use STL, and to not use C++ memory management and
exception handling? How can you leave a function in an irregular way without
Thanks for the clarification Simon,
I think it is safe (R-safe?) to say that if there are no exceptions or errors
on either side, then it is highly likely that everything is fine.
When there are errors or exceptions, it is probably NOT safe to try to
recover. Better to terminate the R session,
Dominick,
On Apr 30, 2010, at 2:51 PM, Dominick Samperi wrote:
Thanks for the clarification Simon,
I think it is safe (R-safe?) to say that if there are no exceptions or errors
on either side, then it is highly likely that everything is fine.
I think so - at least on the exceptions
Indeed. As I said, using heap objects (explicit initialization) does solve
that issue, but you have to be again wary of other libraries which may still
use static initializers.
I just did a little test and found, in the case of gcc/g++, that a
main C main program linked with a C++ library
The R docs say that there are two methods that the C programmer can
allocate memory, one where R automatically frees the memory on
return from .C/.Call, and the other where the user takes responsibility
for freeing the storage. Both methods involve using R-provided
functions.
What happens when
11 matches
Mail list logo