[Rd] potential bug in attribute handling for externalptr

Jeroen Ooms jeroen at berkeley.edu
Sat Apr 15 14:57:34 CEST 2017


On Fri, Apr 14, 2017 at 11:27 PM, Patrick Perry <pperry at stern.nyu.edu> wrote:
> Is the following expected behavior? I would expect that modifying y's attributes should not affect x.

Yes this is expected. Environments and external-ptr objects are never
copied on assignment, hence in your example 'x' and 'y' are the same
object. See e.g. ?reg.finalizer or section 5.13 of "writing r
extensions" on external pointers and weak references.



More information about the R-devel mailing list