Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::Collector Class Reference

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.

Detailed Description

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.

See also
StackFrame::GetCollector

Member Function Documentation

◆ Register()

void Bond::Collector::Register ( CollectableHandle && object)
inline

Registers a Collectable object for later destruction.

Parameters
objectAn 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.

The documentation for this class was generated from the following file:
  • include/bond/vm/collector.h