|
dxFeed Graal CXX API v8.1.0
|
Type-erased ownership state shared by Java object and Java object-list handle wrappers. More...
#include <JavaObjectHandle.hpp>
Public Member Functions | |
| JavaObjectHandleState (void *handle, Deleter deleter) noexcept | |
| Creates an ownership state for a native handle. | |
| ~JavaObjectHandleState () noexcept | |
| Releases the owned handle, if any, and unregisters the state. | |
| void | moveFrom (JavaObjectHandleState &other) noexcept |
| Transfers ownership from another state and releases the handle previously owned by this state. | |
| void | reset (void *handle=nullptr) noexcept |
| Replaces the owned handle, releasing the previous one. | |
| void * | get () const noexcept |
| Returns the currently owned native handle. | |
Friends | |
| class | JavaObjectHandleRegistry |
Type-erased ownership state shared by Java object and Java object-list handle wrappers.
A non-null state registers itself for isolate shutdown and unregisters itself when reset or destroyed.
|
noexcept |
Creates an ownership state for a native handle.
| handle | The native handle, or nullptr for an empty state. |
| deleter | The function used to release a non-null handle. |
References JavaObjectHandleState().
Referenced by JavaObjectHandleState().
|
inlinenodiscardnoexcept |
Returns the currently owned native handle.
nullptr when the state is empty.
|
noexcept |
Transfers ownership from another state and releases the handle previously owned by this state.
| other | The state from which ownership is transferred. |
|
noexcept |
Replaces the owned handle, releasing the previous one.
| handle | The new native handle, or nullptr to make the state empty. |
Referenced by ~JavaObjectHandleState().