Placement of attributes

Ross Ihaka
Tue, 24 Mar 1998 07:47:43 +1200 (NZST)

The PROTECT macro has to do with protecting an internal object from the
garbage collector.

	SEXP x;			/* x is an s-expression */
				/* i.e. an R object of some sort */

	x = allocate an object

Every PROTECTED object must be UNPROTECTed before you exit from the
current function.  The interpreter keeps track of how may pointers
are protected at entry and checks that this is the same at exit.

I am hoping that medium term we will be able to switch from our
home-grown garbage-collector to the Boehm conservative collector.
This should fix all sorts of problems, but there are a couple of
save/restore problems which need to fixed before that.

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: