Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_allocator != null)
         {
             _allocator.FreeMemory(Pointer);
         }
         Pointer = IntPtr.Zero;
     }
 }
Example #2
0
 protected override bool ReleaseHandle()
 {
     _allocator.FreeMemory(handle);
     handle = IntPtr.Zero;
     return(true);
 }