Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeAllocHHandle.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
4
namespace
Microsoft.Win32.SafeHandles
;
5
6
internal
sealed
class
SafeAllocHHandle
:
SafeBuffer
7
{
8
internal
SafeAllocHHandle
(
IntPtr
handle
)
9
: base(ownsHandle: true)
10
{
11
SetHandle
(
handle
);
12
}
13
14
protected
override
bool
ReleaseHandle
()
15
{
16
if
(
handle
!=
IntPtr
.
Zero
)
17
{
18
Marshal
.
FreeHGlobal
(
handle
);
19
}
20
return
true
;
21
}
22
}
Microsoft.Win32.SafeHandles.SafeAllocHHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeAllocHHandle.cs:14
Microsoft.Win32.SafeHandles.SafeAllocHHandle.SafeAllocHHandle
SafeAllocHHandle(IntPtr handle)
Definition
SafeAllocHHandle.cs:8
Microsoft.Win32.SafeHandles.SafeAllocHHandle
Definition
SafeAllocHHandle.cs:7
System.Runtime.InteropServices.Marshal.FreeHGlobal
static void FreeHGlobal(IntPtr hglobal)
Definition
Marshal.cs:1680
System.Runtime.InteropServices.Marshal
Definition
Marshal.cs:14
System.Runtime.InteropServices.SafeBuffer
Definition
SafeBuffer.cs:8
System.Runtime.InteropServices.SafeHandle.SetHandle
void SetHandle(IntPtr handle)
Definition
SafeHandle.cs:42
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:8
Microsoft.Win32.SafeHandles
Definition
SafeProcessHandle.cs:3
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System
Definition
BlockingCollection.cs:8
System.IntPtr.Zero
static readonly IntPtr Zero
Definition
IntPtr.cs:18
System.IntPtr
Definition
IntPtr.cs:14
source
System.Text.Encoding.CodePages
Microsoft.Win32.SafeHandles
SafeAllocHHandle.cs
Generated by
1.10.0