Uh oh!
There was an error while loading. Please reload this page.
Create 1 preserve list per compilation unit - #331
Conversation
There was a problem hiding this comment.
On further thought I think it'd still be nicer to store in the calling package's namespace. Not only for graph-domination purposes but also it'd make it possible to add some R-level tools in cpp11 to inspect all objects currently created by your cpp11 code, which might be useful in debugging situations.
It shouldn't be too hard to do that once we've added a symbol in the init file that represents the package namespace. This will make it possible to grab the namespace environment to get the precious list in the first run. And the init list could be initialised from the C-level init function.
Not a blocker by any means, this PR is already good for now!
Uh oh!
There was an error while loading. Please reload this page.
Closes#330 (see this issue for full discussion)
Closes#268 (as there is no longer a global option)
This is the minimal amount of work to move from a global protection list to 1 protection list per compilation unit.
In two follow up PRs I will:
release_all(), require R >= 3.5.0, removeCPP11_USE_PRESERVE_OBJECTand its related code (not much), remove the documentation section about R 3.5.0 and the tradeoffs about unwind-protect (Require R >=3.5.0 and removerelease_all()#332)