Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeLocalAllocHandle.cs
Go to the documentation of this file.
1
using
System.Runtime.InteropServices
;
2
3
namespace
Internal.Cryptography.Pal.Native
;
4
5
internal
sealed
class
SafeLocalAllocHandle
:
SafePointerHandle
<SafeLocalAllocHandle>
6
{
7
public
static
SafeLocalAllocHandle
Create
(
int
cb)
8
{
9
SafeLocalAllocHandle
safeLocalAllocHandle =
new
SafeLocalAllocHandle
();
10
safeLocalAllocHandle.SetHandle(
Marshal
.
AllocHGlobal
(cb));
11
return
safeLocalAllocHandle;
12
}
13
14
protected
sealed
override
bool
ReleaseHandle
()
15
{
16
Marshal
.
FreeHGlobal
(handle);
17
return
true
;
18
}
19
}
Internal.Cryptography.Pal.Native.SafeLocalAllocHandle.ReleaseHandle
override bool ReleaseHandle()
Definition
SafeLocalAllocHandle.cs:14
Internal.Cryptography.Pal.Native.SafeLocalAllocHandle.Create
static SafeLocalAllocHandle Create(int cb)
Definition
SafeLocalAllocHandle.cs:7
Internal.Cryptography.Pal.Native.SafeLocalAllocHandle
Definition
SafeLocalAllocHandle.cs:6
Internal.Cryptography.Pal.Native.SafePointerHandle
Definition
SafePointerHandle.cs:8
System.Runtime.InteropServices.Marshal.FreeHGlobal
static void FreeHGlobal(IntPtr hglobal)
Definition
Marshal.cs:1680
System.Runtime.InteropServices.Marshal.AllocHGlobal
static IntPtr AllocHGlobal(int cb)
Definition
Marshal.cs:625
System.Runtime.InteropServices.Marshal
Definition
Marshal.cs:14
Internal.Cryptography.Pal.Native
Definition
CERT_BASIC_CONSTRAINTS2_INFO.cs:1
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
source
System.Security.Cryptography.X509Certificates
Internal.Cryptography.Pal.Native
SafeLocalAllocHandle.cs
Generated by
1.10.0