v8  9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
CppHeap Class Reference

#include <v8-cppgc.h>

Public Member Functions

virtual ~CppHeap ()=default
 
cppgc::AllocationHandle & GetAllocationHandle ()
 
cppgc::HeapHandle & GetHeapHandle ()
 
void Terminate ()
 
cppgc::HeapStatistics CollectStatistics (cppgc::HeapStatistics::DetailLevel detail_level)
 

Static Public Member Functions

static std::unique_ptr< CppHeapCreate (v8::Platform *platform, const CppHeapCreateParams &params)
 

Friends

class internal::CppHeap
 

Detailed Description

A heap for allocating managed C++ objects.

Definition at line 85 of file v8-cppgc.h.

Constructor & Destructor Documentation

◆ ~CppHeap()

virtual ~CppHeap ( )
virtualdefault

Member Function Documentation

◆ CollectStatistics()

cppgc::HeapStatistics CollectStatistics ( cppgc::HeapStatistics::DetailLevel  detail_level)
Parameters
detail_levelspecifies whether should return detailed statistics or only brief summary statistics.
Returns
current CppHeap statistics regarding memory consumption and utilization.

◆ Create()

static std::unique_ptr<CppHeap> Create ( v8::Platform platform,
const CppHeapCreateParams params 
)
static

◆ GetAllocationHandle()

cppgc::AllocationHandle& GetAllocationHandle ( )
Returns
the opaque handle for allocating objects using MakeGarbageCollected().

◆ GetHeapHandle()

cppgc::HeapHandle& GetHeapHandle ( )
Returns
the opaque heap handle which may be used to refer to this heap in other APIs. Valid as long as the underlying CppHeap is alive.

◆ Terminate()

void Terminate ( )

Terminate clears all roots and performs multiple garbage collections to reclaim potentially newly created objects in destructors.

After this call, object allocation is prohibited.

Friends And Related Function Documentation

◆ internal::CppHeap

friend class internal::CppHeap
friend

Definition at line 124 of file v8-cppgc.h.


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