Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove erroneous PreserveObject call in String::wrap #1082

Merged
merged 1 commit into from
May 18, 2020

Conversation

kevinushey
Copy link
Contributor

Part of #1081.

This PR fixes an issue where String::wrap() would un-necessarily call Rcpp_PreserveObject(), thereby 'leaking' the SEXP returned to R (basically, not allowing the R GC to ever collect that object).

Unfortunately it doesn't fix #1081 but I do think it's at least part of the issue.

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Preferably, new tests were added which fail without the change
  • Document the changes by file in ChangeLog

@codecov-io
Copy link

Codecov Report

Merging #1082 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1082      +/-   ##
==========================================
- Coverage   95.55%   95.54%   -0.01%     
==========================================
  Files          64       64              
  Lines        2787     2784       -3     
==========================================
- Hits         2663     2660       -3     
  Misses        124      124              
Impacted Files Coverage Δ
inst/include/RcppCommon.h 100.00% <100.00%> (ø)

@eddelbuettel eddelbuettel merged commit 98fc9b5 into master May 18, 2020
@eddelbuettel eddelbuettel deleted the bugfix/string-preserve-fixes branch June 7, 2020 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rcpp is not using R_PreserveObject/R_ReleaseObject` as intended
3 participants