r-lib / cpp11

cpp11 helps you to interact with R objects using C++ code.
https://cpp11.r-lib.org/
Other
193 stars 46 forks source link

Require R >=3.5.0 and remove `release_all()` #332

Closed DavisVaughan closed 11 months ago

DavisVaughan commented 11 months ago

Tied to https://github.com/r-lib/cpp11/pull/331, where we switch from a global preserve list to 1 preserve list per compilation unit. release_all() was intended to support experts that wanted to manually release cpp11 protected objects on R < 3.5.0, but it no longer is applicable for a few reasons:

No one was using release_all() as far as we can tell.


I've also bumped the minimum R version to >=3.5.0, so we no longer need code that supports the "old times" before we had access to R_UnwindProtect(). To this end, I've removed CPP11_USE_PRESERVE_OBJECT as well.

I've kept some details in the internals vignette, because I think the discussion of the alternative approaches is still useful for historical context.