#include <heap-consistency.h>
Public Member Functions | |
NoGarbageCollectionScope (HeapHandle &heap_handle) | |
~NoGarbageCollectionScope () | |
NoGarbageCollectionScope (const NoGarbageCollectionScope &)=delete | |
NoGarbageCollectionScope & | operator= (const NoGarbageCollectionScope &)=delete |
Static Public Member Functions | |
static void | Enter (HeapHandle &heap_handle) |
static void | Leave (HeapHandle &heap_handle) |
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.
|
explicit |
Constructs a scoped object that automatically enters and leaves a no garbage collection scope based on its lifetime.
heap_handle | The corresponding heap. |
cppgc::subtle::NoGarbageCollectionScope::~NoGarbageCollectionScope | ( | ) |
|
delete |
|
static |
Enters a no garbage collection scope. Must be paired with Leave()
. Prefer a scope instance of NoGarbageCollectionScope
.
heap_handle | The corresponding heap. |
|
static |
Leaves a no garbage collection scope. Must be paired with Enter()
. Prefer a scope instance of NoGarbageCollectionScope
.
heap_handle | The corresponding heap. |
|
delete |