destroy method Null safety

  1. @mustCallSuper
void destroy()

Destroy this object.

Implementation

@mustCallSuper
void destroy() {
  decreaseReferenceCount();
  calloc.free(handle);
  handle.value = 0;
}