You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for spotting this pattern. Using Rf_defineVar() this way to
delete a variable from package code is wrong because WRE does not
describe such behavior. That behavior has not been intended by the
implementation and as you observe, the variable will not be properly
deleted.
I found another pattern in another package (Rcpp, Rcpp11) which calls
directly the .Internal() function that deletes a variable, that is also
wrong, one should only use exported wrappers. The only legitimate way to
delete a variable in already released versions of R from C is to use
eval() to call R's rm()/remove(), but we will consider adding a C
function to the API to do this directly.
Thanks. I follow r-devel pretty closely but missed this. [ Turns out I was behind on that folder. Busy day. ] Well and we know how the OP "really" feels about Rcpp, don't we ;-)
This issue is stale (365 days without activity) and will be closed in 31 days unless new activity is seen. Please feel free to re-open it is still a concern, possibly with additional data.
From a recent R-devel post:
And the code:
Rcpp/inst/include/Rcpp/Environment.h
Lines 245 to 252 in d04eae8
We're already calling back to R; might as well use the official function
base::rm
.The text was updated successfully, but these errors were encountered: