dispose method Null safety

void dispose()

Removing an object from memory. Must be called manually.

Implementation

void dispose() {
  if (_isDisposed) return;

  var exception = _getException();
  var destructor =
      _dll_handle.lookupFunction<_Context_Destruct_c, _Context_Destructor_dart>(_context_namespace + 'destroy');

  destructor(this._impl, exception);

  tdvCheckException(exception, _dll_handle);

  _isDisposed = true;
}