|
Broom 1.0.0
A thread-local C++ Garbage Collector
|
Broom is a garbage collector primarily written for C++. It is fully thread-local, meaning that each OS thread will have its own garbage collector state. As a result, Broom never pauses other threads during garbage collection nor needs to intercept the OS threading libraries with its own calls.
Broom supports controlled sharing between threads through the use of broom::sharing_ptr and broom::lifetime_anchor, but each pointer is still fundamentally owned by a single thread. A thread has no visibility inside another thread's Broom state. Broom also allows opting out of running destructors for objects which are still alive at the end of a thread. The memory will still be free'd, but the destructors of the objects will not run. For more information, see broom::no_destructor_scope and broom::sharing_no_destructor_scope.
For examples of Broom usage, see examples/simple/main.cc and examples/simple-mt/main.cc.