Protecting new R objects

References

Change links to: https://blog.r-project.org/

PROTECT/UNPROTECT

R blog

Common errors

PROTECT_WITH_INDEX/REPROTECT

R blog

R_PreserverOjbect/R_ReleaseObject

R blog

The nprotect technique

Protect allocVector() calls

Protect returned objects from other functions