Exemple #1
0
 /// <summary>
 /// Retrieves the number of bytes currently allocated.
 /// </summary>
 public static long GetTotalMemory(bool forceFullCollection)
 {
     //we cannot force, but provide hints
     if (forceFullCollection)
     {
         JSystem.RunFinalization();
         JSystem.Gc();
     }
     return(JRuntime.GetRuntime().TotalMemory());
 }
Exemple #2
0
 /// <summary>
 /// Force a run of the garbase collector.
 /// </summary>
 public static void Collect()
 {
     JSystem.Gc();
 }