Esempio n. 1
0
 /// <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);
 }
Esempio n. 2
0
 public void Dispose()
 {
     Allocated?.Dispose();
     Reference = IntPtr.Zero;
     GC.SuppressFinalize(this);
 }