terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
HandleCollector.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x020000A3 RID: 163
7 public sealed class HandleCollector
8 {
9 // Token: 0x060002DA RID: 730 RVA: 0x0000AD9C File Offset: 0x00008F9C
11 {
12 }
13
14 // Token: 0x060002DB RID: 731 RVA: 0x0000ADAC File Offset: 0x00008FAC
26
27 // Token: 0x17000099 RID: 153
28 // (get) Token: 0x060002DC RID: 732 RVA: 0x0000AE04 File Offset: 0x00009004
29 public int Count
30 {
31 get
32 {
33 return this.handleCount;
34 }
35 }
36
37 // Token: 0x1700009A RID: 154
38 // (get) Token: 0x060002DD RID: 733 RVA: 0x0000AE18 File Offset: 0x00009018
40 {
41 get
42 {
43 return this.initialThreshold;
44 }
45 }
46
47 // Token: 0x1700009B RID: 155
48 // (get) Token: 0x060002DE RID: 734 RVA: 0x0000AE2C File Offset: 0x0000902C
50 {
51 get
52 {
53 return this.maximumThreshold;
54 }
55 }
56
57 // Token: 0x1700009C RID: 156
58 // (get) Token: 0x060002DF RID: 735 RVA: 0x0000AE40 File Offset: 0x00009040
59 public string Name
60 {
61 get
62 {
63 return this.name;
64 }
65 }
66
67 // Token: 0x060002E0 RID: 736 RVA: 0x0000AE54 File Offset: 0x00009054
68 public void Add()
69 {
70 long num = 0L;
71 int num2 = Interlocked.Increment(int.MinValue);
72 int num3 = this.handleCount;
73 int num4 = this.threshold;
74 Monitor.Enter(this, num != 0L);
75 int num5 = 26215;
76 int num6 = this.gc_gen;
77 long num7 = 0L;
80 int num8 = 5;
81 if (num3 != 0)
82 {
83 Monitor.Exit(this);
84 }
85 if (num7 == 0L)
86 {
87 if (num8 == 0)
88 {
89 int[] array;
90 if (num6 != 0)
91 {
92 array = this.gc_counts;
93 if (num5 == 0)
94 {
95 }
97 }
98 if (array == null)
99 {
100 }
101 GC.Collect(num6);
103 int[] array2 = this.gc_counts;
104 if (array == null)
105 {
106 }
107 int num10 = GC.CollectionCount(int.MinValue);
109 }
110 return;
111 }
112 throw new OutOfMemoryException();
113 }
114
115 // Token: 0x060002E1 RID: 737 RVA: 0x0000AF34 File Offset: 0x00009134
116 public void Remove()
117 {
118 long num = 0L;
119 int num2 = Interlocked.Decrement(int.MinValue);
120 int num3 = this.handleCount;
121 Monitor.Enter(this, num != 0L);
122 int num4 = this.initialThreshold;
123 long num5 = 0L;
125 int num6 = 5;
126 if (num4 != 0)
127 {
128 Monitor.Exit(this);
129 }
130 if (num5 == 0L)
131 {
132 if (num6 == 0)
133 {
134 int[] array = this.gc_counts;
135 if (num4 == 0)
136 {
137 }
138 int num7 = GC.CollectionCount(int.MinValue);
140 }
141 return;
142 }
143 throw new OutOfMemoryException();
144 }
145
146 // Token: 0x04000278 RID: 632
147 private const int deltaPercent = 10;
148
149 // Token: 0x04000279 RID: 633
150 private string name;
151
152 // Token: 0x0400027A RID: 634
153 private int initialThreshold;
154
155 // Token: 0x0400027B RID: 635
156 private int maximumThreshold;
157
158 // Token: 0x0400027C RID: 636
159 private int threshold;
160
161 // Token: 0x0400027D RID: 637
162 private int handleCount;
163
164 // Token: 0x0400027E RID: 638
165 private int[] gc_counts;
166
167 // Token: 0x0400027F RID: 639
168 private int gc_gen;
169 }
170}
class f__AnonymousType0<< Count > j__TPar
static int CollectionCount(int generation)
Definition GC.cs:79
static void Collect(int generation)
Definition GC.cs:46
HandleCollector(string name, int initialThreshold, int maximumThreshold)
HandleCollector(string name, int initialThreshold)
static int Increment(int location)
static int Decrement(int location)
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:207