From lille.stor at gmx.com  Fri Sep  8 16:08:01 2017
From: lille.stor at gmx.com (lille stor)
Date: Fri, 8 Sep 2017 16:08:01 +0200
Subject: [Rd] Change of variable address due to GC
Message-ID: <trinity-8a6a4fc3-add7-4837-9b62-f488286205e9-1504879681153@3c-app-mailcom-bs14>

Hi,
?
I would like to know if the Garbage Collector (GC) changes the address of a variable in R. In other words, assuming the following code:
?
??? ? library(pryr)
?
? ??? x <- 1:1024
?
??? ? addr <- address(x)? # save address of variable "x" in "addr"

  ???????   ? .
??  ?????   ? .
????  ???   ? .
????? (execution of operations that create/destroy many small/big objects in memory, which will likely make the GC to be called)
?????   ???   .
??? ????  ?   .
? ??????    ? .
?
????? if (addr != address(x))
????? {
? ??????? print("Address of x changed!")
?? ?? }
?
?
Will the message "Address of x changed!" be ever printed?
?
Thank you!



[Rd] Change of variable address due to GC
lille stor