Skip to content
Prev 47690 / 63424 Next

internal copying in R (soon to be released R-3.1.0

Jens,
On Mar 3, 2014, at 3:35 PM, Jens Oehlschl?gel <jens.oehlschlaegel at truecluster.com> wrote:

            
If NAMED > 0 then calling duplicate() is necessary to make sure you have a non-shared copy.
Matthew pointed out that line and I cannot shed more light on it, since it's not true - at least not currently.
It is not - you're not testing .Call() - your'e testing the assignments in frames which cause additional bumps of NAMED. If you actually test .Call() you'll see what I have reported - .Call() itself does NOT affect NAMED.
Again, as I said earlier, you're on the wrong track here - .Call() doesn't touch it - it is left to the C code. Note that NAMED cannot be decremented (unless you use a ref counting version of R) once it reaches 2 since that means "two or more" so. The only time where you can decrement it is if you are the owner that set it from 0 to 1.

Cheers,
Simon