Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
cppgc::subtle::NoGarbageCollectionScope Class Referencefinal

#include <heap-consistency.h>

Public Member Functions

 NoGarbageCollectionScope (HeapHandle &heap_handle)
 
 ~NoGarbageCollectionScope ()
 
 NoGarbageCollectionScope (const NoGarbageCollectionScope &)=delete
 
NoGarbageCollectionScopeoperator= (const NoGarbageCollectionScope &)=delete
 

Static Public Member Functions

static void Enter (HeapHandle &heap_handle)
 
static void Leave (HeapHandle &heap_handle)
 

Detailed Description

Avoids invoking garbage collection finalizations. Already running garbage collection phase are unaffected by this scope.

Should only be used temporarily as the scope has an impact on memory usage and follow up garbage collections.

Constructor & Destructor Documentation

◆ NoGarbageCollectionScope() [1/2]

cppgc::subtle::NoGarbageCollectionScope::NoGarbageCollectionScope ( HeapHandle heap_handle)
explicit

Constructs a scoped object that automatically enters and leaves a no garbage collection scope based on its lifetime.

Parameters
heap_handleThe corresponding heap.

◆ ~NoGarbageCollectionScope()

cppgc::subtle::NoGarbageCollectionScope::~NoGarbageCollectionScope ( )

◆ NoGarbageCollectionScope() [2/2]

cppgc::subtle::NoGarbageCollectionScope::NoGarbageCollectionScope ( const NoGarbageCollectionScope )
delete

Member Function Documentation

◆ Enter()

static void cppgc::subtle::NoGarbageCollectionScope::Enter ( HeapHandle heap_handle)
static

Enters a no garbage collection scope. Must be paired with Leave(). Prefer a scope instance of NoGarbageCollectionScope.

Parameters
heap_handleThe corresponding heap.

◆ Leave()

static void cppgc::subtle::NoGarbageCollectionScope::Leave ( HeapHandle heap_handle)
static

Leaves a no garbage collection scope. Must be paired with Enter(). Prefer a scope instance of NoGarbageCollectionScope.

Parameters
heap_handleThe corresponding heap.

◆ operator=()

NoGarbageCollectionScope & cppgc::subtle::NoGarbageCollectionScope::operator= ( const NoGarbageCollectionScope )
delete

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