Broom 1.0.0
A thread-local C++ Garbage Collector
Loading...
Searching...
No Matches
Public Member Functions | List of all members
broom::BroomNoDestructorScope Struct Reference

#include <broom.h>

Public Member Functions

 BroomNoDestructorScope (broom_configuration config={})
 
 ~BroomNoDestructorScope ()
 
 BroomNoDestructorScope (const BroomNoDestructorScope &other)=delete
 
 BroomNoDestructorScope (BroomNoDestructorScope &&other)=delete
 
BroomNoDestructorScopeoperator= (const BroomNoDestructorScope &other)=delete
 
BroomNoDestructorScopeoperator= (BroomNoDestructorScope &&other)=delete
 

Detailed Description

A helper RAII wrapper that configures Broom to not run destructors for objects which were still alive when the thread exits. The memory will still be free'd, but their destructors won't be invoked. broom::no_destructor_scope is also available as an alias for this class to support a more traditional C++ style.

Definition at line 136 of file broom.h.

Constructor & Destructor Documentation

◆ BroomNoDestructorScope() [1/3]

broom::BroomNoDestructorScope::BroomNoDestructorScope ( broom_configuration  config = {})
inline

The constructor simply calls thread_init() with an optional configuration, setting the run_destructors_on_shutdown value of broom_configuration to false.

Parameters
configThe configuration to initialize Broom on this thread with. This parameter will be modified with run_destructors_on_shutdown set to false.

Definition at line 146 of file broom.h.

◆ ~BroomNoDestructorScope()

broom::BroomNoDestructorScope::~BroomNoDestructorScope ( )
inline

The destructor simply calls thread_teardown().

Definition at line 153 of file broom.h.

◆ BroomNoDestructorScope() [2/3]

broom::BroomNoDestructorScope::BroomNoDestructorScope ( const BroomNoDestructorScope other)
delete

◆ BroomNoDestructorScope() [3/3]

broom::BroomNoDestructorScope::BroomNoDestructorScope ( BroomNoDestructorScope &&  other)
delete

Member Function Documentation

◆ operator=() [1/2]

BroomNoDestructorScope & broom::BroomNoDestructorScope::operator= ( BroomNoDestructorScope &&  other)
delete

◆ operator=() [2/2]

BroomNoDestructorScope & broom::BroomNoDestructorScope::operator= ( const BroomNoDestructorScope other)
delete

The documentation for this struct was generated from the following file: