Hi Stefan,
On 11 March 2025 at 17:32, Stefan Boehringer wrote: | with a standard Rcpp module I get the error "Expecting an external pointer: | [type=environment]." from x$.self$finalize() | which is an internal wrapper around modules from Rcpp. Would you have a complete example, say in a repo? | The underlying C++ class allocates memory through standard STL object | allocation. The class does perform disk based memory mapping which is unmapped | in the destructor. I did not succeed in further isolating the problem. We have little to go by here. You could start from the existing documentation on Rcpp Modules, its examples and its unit tests and build up from there. Or you could examine existing packages with Modules. The code search at GitHub is a good way to find examples. A very naive search for RCPP_MODULE gets more than 1k hits: https://github.com/search?q=org%3Acran%20RCPP_MODULE&type=code Hope this helps, cheers, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ 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