Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetTotalMemory() [2/2]

static long System.GC.GetTotalMemory ( bool forceFullCollection)
inlinestatic

Definition at line 223 of file GC.cs.

224 {
225 long totalMemory = GetTotalMemory();
226 if (!forceFullCollection)
227 {
228 return totalMemory;
229 }
230 int num = 20;
231 long num2 = totalMemory;
232 float num3;
233 do
234 {
236 Collect();
237 totalMemory = num2;
238 num2 = GetTotalMemory();
239 num3 = (float)(num2 - totalMemory) / (float)totalMemory;
240 }
241 while (num-- > 0 && (!(-0.05 < (double)num3) || !((double)num3 < 0.05)));
242 return num2;
243 }
static void Collect()
Definition GC.cs:124
static long GetTotalMemory()
static void WaitForPendingFinalizers()
Definition GC.cs:194

References System.GC.Collect(), System.GC.GetTotalMemory(), and System.GC.WaitForPendingFinalizers().