Esempio n. 1
0
File: GC.cs Progetto: slagusev/api
 /// <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());
 }
Esempio n. 2
0
File: GC.cs Progetto: slagusev/api
 /// <summary>
 /// Force a run of the garbase collector.
 /// </summary>
 public static void Collect()
 {
     JSystem.Gc();
 }