dxFeed Graal CXX API v8.1.0
Loading...
Searching...
No Matches
JavaObjectHandleRegistry Class Referencefinal

Tracks native Java object handles that must be released before the Graal isolate is torn down. More...

#include <JavaObjectHandle.hpp>

Public Member Functions

void releaseAll () noexcept
 Releases all currently registered handles while the Graal isolate is still available.
 

Static Public Member Functions

static JavaObjectHandleRegistry & getInstance () noexcept
 Returns the process-wide handle registry.
 

Friends

class JavaObjectHandleState
 

Detailed Description

Tracks native Java object handles that must be released before the Graal isolate is torn down.

The registry is initialized before the isolate and therefore remains available for the complete isolate lifetime, including destruction of handles owned by function-local and namespace-scope static objects.

Member Function Documentation

◆ getInstance()

JavaObjectHandleRegistry & JavaObjectHandleRegistry::getInstance ( )
staticnoexcept

Returns the process-wide handle registry.

Returns
The handle registry instance.

◆ releaseAll()

void JavaObjectHandleRegistry::releaseAll ( )
noexcept

Releases all currently registered handles while the Graal isolate is still available.

Handle owners remain valid and observe a null handle after this call.