SafePointer<T extends NativeType> constructor
SafePointer<T extends NativeType> (})
Constructs a SafePointer with the given pointer and optional dispose function.
- pointer: The pointer to manage.
disposeFunc
: Optional function to dispose the pointer.debugName
: Optional name for debugging purposes.
Implementation
SafePointer(
this._pointer, {
void Function(Pointer<T>)? disposeFunc,
String debugName = 'Unnamed',
}) : _disposeFunc = disposeFunc,
_debugName = debugName;