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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
Rcpp::Vector contains an SEXP (ref-counted via R_PreserveObject() and R_ReleaseObject()). No copies or duplication involved. It does fix the problem, but a more sustainable fix involves changing references to pointers in the affected constructors, which would make passing temporary objects much harder.
3e9cf81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a potentially costly change since we'll now be copying vectors of data? Or does Vector contain a SEXP?
3e9cf81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rcpp::Vector
contains anSEXP
(ref-counted viaR_PreserveObject()
andR_ReleaseObject()
). No copies or duplication involved. It does fix the problem, but a more sustainable fix involves changing references to pointers in the affected constructors, which would make passing temporary objects much harder.3e9cf81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, great.