/// <summary> /// Frees memory and handles allocated for the module. /// </summary> public override void Dispose() { _isDisposed = true; if (IsImageOwner) { _module.Dispose(); } }
/// <summary> /// Frees memory and handles allocated for the module. /// </summary> public override void Dispose() { _isDisposed = true; if (IsImageOwner) { _module.Dispose(); var onDispose = Interlocked.Exchange(ref _onDispose, null); onDispose?.Invoke(); } }