/// <summary> /// Releases unmanaged and - optionally - managed resources /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (disposing) { #if !WINDOWS_UWP if (_blob != null) { _blob.Dispose(); _blob = null; } #endif } if (_gCHandle.IsAllocated) { _gCHandle.Free(); } unsafe { if (_ownsBuffer && _buffer != (sbyte *)0) { SdxUtilities.FreeMemory((IntPtr)_buffer); _buffer = (sbyte *)0; } } }