search for: r_unload_xxx

Displaying 2 results from an estimated 2 matches for "r_unload_xxx".

2018 Aug 09
0
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
...ointing into the space of the shared object being unloaded. So it is expected that R will segfault later when such finalizer is run. Currently there is no other way than to handle this on the side of the shared library/package, e.g. as Luke does in his simplemmap package. A library can declare R_unload_XXX function (see Writing R Extensions) that will be called before it is unloaded. So, one can keep say a list of objects with finalizers and clear/run the finalizers in R_unload_XXX. I don't think we could do this automatically on the R's side with the current API. I don't think there...
2018 Aug 06
2
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
Hi all, I'm not sure if I'm not supposed to do the following (the dyn.unload part, I mean) or this could be a bug (in R or Rcpp): ``` Rcpp::sourceCpp(code=' #include <Rcpp.h> class Object {}; //[[Rcpp::export]] SEXP new_object() { return Rcpp::XPtr<Object>(new Object()); }' ) new_object() dyn.unload(list.files(tempdir(), ".(so|dll)$",