|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Tracks and destroys Collectable objects. More...
#include <bond/vm/collector.h>
Public Member Functions | |
| void | Register (CollectableHandle &&object) |
| Registers a Collectable object for later destruction. | |
Tracks and destroys Collectable objects.
All tracked Collectable objects are destroyed when the Collector is destroyed, most recently registered first. Each StackFrame has a Collector, which allows native functions to tie the lifetime of objects they create to that of a function call.
|
inline |
Registers a Collectable object for later destruction.
| object | An owning handle to the Collectable object. The Collector takes ownership of the object, and of any objects already chained to it. Nothing is registered if the handle is null. |