/// <summary> /// Releases all resources used by the <see cref="AllocatedMemory" /> object. /// </summary> public void Dispose() { // Free the allocated memory Allocated?.Dispose(); // Set the pointer to zero Reference = IntPtr.Zero; // Avoid the finalizer GC.SuppressFinalize(this); }
public void Dispose() { Allocated?.Dispose(); Reference = IntPtr.Zero; GC.SuppressFinalize(this); }