CXXR (C++ R)
|
#include "CXXR/GCRoot.h"
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <tr1/unordered_map>
Namespaces | |
namespace | CXXR |
Namespace for the CXXR project. |
Functions | |
void | R_PreserveObject (SEXP object) |
Protect object against garbage collection. | |
void | R_ReleaseObject (SEXP object) |
Remove object's protection against garbage collection. |
Variables | |
tr1::unordered_map< const RObject *, GCRoot<> > | precious |
Implementation of class GCRootBase.
void R_PreserveObject | ( | SEXP | object | ) |
Protect object against garbage collection.
This is intended for long-term protection, for which PROTECT() etc. would be inappropriate.
object | Pointer to the object to be preserved. It is permissible for this to be a null pointer. |
void R_ReleaseObject | ( | SEXP | object | ) |
Remove object's protection against garbage collection.
object | Pointer to the object whose protection is to be removed. It is permissible (but pointless) for this to be a pointer to an object that is not currently protected by R_PreserveObject(), but in that case R_ReleaseObject() has no effect. |