On 1/2/10 5:50 PM, Romain Francois wrote:
Thanks.

On 01/02/2010 05:36 PM, Laurent Gautier wrote:

[Disclaimer: what is below reflects my understanding from reading the R
source, others will correct where deemed necessary]

On 1/2/10 12:00 PM, r-devel-requ...@r-project.org wrote:

(...)


In particular, if we preserve the same SEXP twice (or more), should we
implement some sort of reference counting ?

This depends on the requirements for your system.

We wrap up SEXP into a C++ class that in particular manages itself
preserving and releasing the object to garbage collection.

If you do not allow several C++ instances to share the same SEXP, you should not need reference counting. In the case of rpy2, this was made necessary for allowing inheritance (as nested calls to constructors can cause a transient sharing of the given SEXP across several Python objects).


(...)



L.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to