mirror of https://github.com/dahall/Vanara.git
Added NoOptimization attribute to SafeHANDLE disposal method
parent
34ce5635ff
commit
f7dd0a9cf6
|
@ -1,5 +1,6 @@
|
|||
using Microsoft.Win32.SafeHandles;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Vanara.PInvoke
|
||||
|
@ -2013,6 +2014,7 @@ namespace Vanara.PInvoke
|
|||
protected abstract bool InternalReleaseHandle();
|
||||
|
||||
/// <inheritdoc/>
|
||||
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
if (IsInvalid) return true;
|
||||
|
|
Loading…
Reference in New Issue