free method
Manually free a pointer and remove it from cleanup
ptr
: The pointer to free.
Implementation
void free(Pointer<NativeType> ptr) {
if (_isDisposed) {
throw StateError('Cannot free memory in disposed scope');
}
if (_allocations.remove(ptr)) {
calloc.free(ptr);
}
}