This _is_ covered in `Writing R Extensions'. What is unsafe is to allow a
gc to occur.
On Wed, 12 Feb 2003, Timur Elzhov wrote:
> In all R functions written in C one must unprotect
> result before returning them:
>
> {
> ...
> UNPROTECT(1) /* unprotecting `ans' */
>
> ret
Dear R experts,
In all R functions written in C one must unprotect
result before returning them:
{
...
UNPROTECT(1) /* unprotecting `ans' */
return ans;
}
Why does one shure that memory occupied by `ans'
won't be used by R immediately after unprotecting?
Ok, is the next