System.GC
namespace System
{
public static class GC
{
public static int MaxGeneration { get; }
public static void AddMemoryPressure(
long bytesAllocated);
public static void CancelFullGCNotification();
public static void Collect();
public static void Collect(
int generation);
public static void Collect(
int generation,
GCCollectionMode mode);
public static void Collect(
int generation,
GCCollectionMode mode,
bool blocking);
public static void Collect(
int generation,
GCCollectionMode mode,
bool blocking,
bool compacting);
public static int CollectionCount(
int generation);
public static void EndNoGCRegion();
public static int GetGeneration(
object obj);
public static int GetGeneration(
WeakReference wo);
public static long GetTotalMemory(
bool forceFullCollection);
public static void KeepAlive(
object obj);
public static void RegisterForFullGCNotification(
int maxGenerationThreshold,
int largeObjectHeapThreshold);
public static void RemoveMemoryPressure(
long bytesAllocated);
public static void ReRegisterForFinalize(
object obj);
public static void SuppressFinalize(
object obj);
public static bool TryStartNoGCRegion(
long totalSize);
public static bool TryStartNoGCRegion(
long totalSize,
bool disallowFullBlockingGC);
public static bool TryStartNoGCRegion(
long totalSize,
long lohSize);
public static bool TryStartNoGCRegion(
long totalSize,
long lohSize,
bool disallowFullBlockingGC);
public static GCNotificationStatus WaitForFullGCApproach();
public static GCNotificationStatus WaitForFullGCApproach(
int millisecondsTimeout);
public static GCNotificationStatus WaitForFullGCComplete();
public static GCNotificationStatus WaitForFullGCComplete(
int millisecondsTimeout);
public static void WaitForPendingFinalizers();
}
}