/// <summary>
 /// Called when object is disposed or finalized.
 /// </summary>
 protected override bool ReleaseHandle()
 {
     if (NativeMethods.LocalFree(this.handle) != IntPtr.Zero)
     {
         return(false);
     }
     return(true);
 }
 /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>
 /// <returns>
 /// <see langword="true"/> if the handle is released successfully; otherwise, in the event of a catastrophic failure,
 /// <see langword="false"/>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.
 /// </returns>
 protected override bool ReleaseHandle()
 {
     return(handle == IntPtr.Zero || NativeMethods.LocalFree(handle) == IntPtr.Zero);
 }