destroyMagickWand method
Deallocates memory associated with this wand. You can't use the wand after calling this function.
Implementation
Future<void> destroyMagickWand() async {
_wandPtr = _magickWandBindings.DestroyMagickWand(_wandPtr);
// clean up the streams and stream subscriptions of the progress monitor
_progressMonitorReceivePort?.close();
if (_progressMonitorReceivePortSendPortPtr != null) {
malloc.free(_progressMonitorReceivePortSendPortPtr!);
}
await _progressMonitorReceivePortStreamSubscription?.cancel();
await _progressMonitorStreamControllerStreamSubscription?.cancel();
await _progressMonitorStreamController?.close();
}