From ripley at stats.ox.ac.uk  Thu May 15 10:46:39 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 15 May 2008 09:46:39 +0100 (BST)
Subject: [Rd] Reset an embedded R.dll
In-Reply-To: <op.ua6p20nvolvcyz@lcp>
References: <op.ua5nbgtdolvcyz@arkanoid.garten>
	<alpine.LFD.1.10.0805150610180.16696@gannet.stats.ox.ac.uk>
	<op.ua6lmeaholvcyz@arkanoid.garten>
	<alpine.LFD.1.10.0805150702050.30193@gannet.stats.ox.ac.uk>
	<op.ua6p20nvolvcyz@lcp>
Message-ID: <alpine.LFD.1.10.0805150944460.20574@gannet.stats.ox.ac.uk>

On Thu, 15 May 2008, Bernd Schoeller wrote:

> On Thu, 15 May 2008 06:04:51 -0000, Prof Brian Ripley <ripley at stats.ox.ac.uk> 
> wrote:
>
>>> Last question: Will I need to UNPROTECT_PTR all references held, or will 
>>> the call to Rf_endEmbeddedR also free protected references?
>> 
>> What is a 'reference' here?
>
> Right, my question was imprecise. I meant 'SEXP' (which is a 
> reference/pointer to a SEXPREC, as far as I understand it).

As distinct from the various reference SEXPREC types.

>> Rf_endEmbeddedR  does what ending an R session does, no more, no less.
>
> Ok - my question put differently: Will ending an R session run a full garbage 
> collection, ignoring the 'protected' status of previously protected SEXP?

No.  It will run finalizers if they were set up to do so.

>
> Bernd
>
> -- 
> Comerge AG, Technoparkstrasse 1, CH-8005 Zurich, Switzerland

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Reset an embedded R.dll
Prof Brian Ripley