docs
Loading...
Searching...
No Matches
HandleStats

#include <Ultralight/js/Context.h>

Overview

Counts of the live handles on one context, for finding leaks (see Context::GetHandleStats()).

Note
Copies of one js::Value count once, and the counts include a few handles the library holds for you (eg, for a Promise made with Context::MakePromise()).
Note
A destroyed handle can stay counted until the next Renderer::Update().

Public Member Functions

size_t count (Type type) const
 Get the number of live value handles of one type.
size_t ProtectedEstimate () const
 Count the value handles that keep something from being garbage collected (strings, symbols, BigInts, and objects).

Public Attributes

size_t total_values = 0
 Live value handles.
size_t values_by_type [kULJSType_Count] = {}
 Live value handles by js::Type (see count()).
size_t weak_refs = 0
 Live weak references (0 once the context is gone).

Member Function Documentation

◆ count()

size_t count ( Type type) const
inline

Get the number of live value handles of one type.

Parameters
typeThe value type.
Returns
Returns the number of live value handles of that type.

◆ ProtectedEstimate()

size_t ProtectedEstimate ( ) const
inline

Count the value handles that keep something from being garbage collected (strings, symbols, BigInts, and objects).

Returns
Returns the number of those handles.

Member Data Documentation

◆ total_values

size_t total_values = 0

Live value handles.

◆ values_by_type

size_t values_by_type[kULJSType_Count] = {}

Live value handles by js::Type (see count()).

◆ weak_refs

size_t weak_refs = 0

Live weak references (0 once the context is gone).


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