Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeThreadHandle.cs
Go to the documentation of this file.
1using System;
3
5
6internal sealed class SafeThreadHandle : SafeHandle
7{
8 public override bool IsInvalid
9 {
10 get
11 {
12 if (!(handle == IntPtr.Zero))
13 {
14 return handle == new IntPtr(-1);
15 }
16 return true;
17 }
18 }
19
21 : base(new IntPtr(0), ownsHandle: true)
22 {
23 }
24
25 protected override bool ReleaseHandle()
26 {
27 return global::Interop.Kernel32.CloseHandle(handle);
28 }
29}
static readonly IntPtr Zero
Definition IntPtr.cs:18