Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
SafeHandle.DangerousRelease Method
Definition
- Namespace:
- System.Runtime.InteropServices
- Assemblies:
- mscorlib.dll, System.Runtime.Handles.dll
- Assemblies:
- netstandard.dll, System.Runtime.dll
- Assembly:
- System.Runtime.Handles.dll
- Assembly:
- System.Runtime.dll
- Assembly:
- mscorlib.dll
- Assembly:
- System.Runtime.InteropServices.dll
- Assembly:
- netstandard.dll
- Source:
- SafeHandle.cs
- Source:
- SafeHandle.cs
- Source:
- SafeHandle.cs
- Source:
- SafeHandle.cs
- Source:
- SafeHandle.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Manually decrements the reference counter on a SafeHandle instance.
public:
void DangerousRelease();
[System.Security.SecurityCritical]
public void DangerousRelease();
public void DangerousRelease();
[<System.Security.SecurityCritical>]
member this.DangerousRelease : unit -> unit
member this.DangerousRelease : unit -> unit
Public Sub DangerousRelease ()
- Attributes
Remarks
The DangerousRelease method is the counterpart to DangerousAddRef. You should always match a call to the DangerousRelease method with a successful call to DangerousAddRef.
Caution
In the same way that unmatched DangerousAddRef calls can cause resource leaks, unmatched DangerousRelease calls can cause invalid handle states to become visible to other threads.
Applies to
See also
Feedback
Was this page helpful?
