CXXR (C++ R) API
Classes | Namespaces | Functions
GCRoot.h File Reference

($Id: GCRoot.h 1353 2013-03-18 16:59:38Z arr $)

Templated class CXXR::GCRoot and its untemplated base class CXXR::GCRootBase. More...

#include "CXXR/RObject.h"
#include <list>
#include <tr1/unordered_map>
#include "CXXR/GCNode.hpp"
Include dependency graph for GCRoot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CXXR::GCRootBase
 Untemplated base class for GCRoot. More...
class  CXXR::GCRoot< T >
 Smart pointer to protect a GCNode from garbage collection. More...

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.

Detailed Description

Templated class CXXR::GCRoot and its untemplated base class CXXR::GCRootBase.


Function Documentation

void R_PreserveObject ( SEXP  object)

Protect object against garbage collection.

This is intended for long-term protection, for which PROTECT() etc. would be inappropriate.

Parameters:
objectPointer 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.

Parameters:
objectPointer 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.