The function rinterface_lib._rinterface_capi._evaluate_in_r() is returning a pointer to an R object.
That object stops being protected from garbage collection as soon as that function returns (at that
point the object's lifespan is not under R's protection and is no longer protected by the Python object having it as an attribute):
However, when used within "rternalized" functions, returning from that python function is immediately handing control back to R that protects it. From there lthe flow is the one of a regular R function called by rpy2.
I do not think that a premature garbage collection of the R object returned can occur and this should be a good fix.