Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GC Methods

The GC type exposes the following members.

  NameDescription
Public method Static member AddMemoryPressure Informs the runtime of a large allocation of unmanaged memory that should be taken into account when scheduling garbage collection.
Public method Static member CancelFullGCNotification Cancels the registration of a garbage collection notification.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Collect Overloaded. Forces garbage collection.
Public method Static member CollectionCount Returns the number of times garbage collection has occurred for the specified generation of objects.
Public method Static member GetGeneration Overloaded. Returns the current generation number of an object.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework GetTotalMemory Retrieves the number of bytes currently thought to be allocated. A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework KeepAlive References the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called.
Public method Static member RegisterForFullGCNotification Specifies that a garbage collection notification should be raised when conditions favor full garbage collection and when the collection has been completed.
Public method Static member RemoveMemoryPressure Informs the runtime that unmanaged memory has been released and no longer needs to be taken into account when scheduling garbage collection.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework ReRegisterForFinalize Requests that the system call the finalizer for the specified object for which SuppressFinalize has previously been called.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework SuppressFinalize Requests that the system not call the finalizer for the specified object.
Public method Static member WaitForFullGCApproach Overloaded. Returns the status of a registered notification for determining whether a full garbage collection by the common language runtime is imminent.
Public method Static member WaitForFullGCComplete Overloaded. Returns the status of a registered notification for determining whether a full garbage collection by the common language runtime has completed.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework WaitForPendingFinalizers Suspends the current thread until the thread that is processing the queue of finalizers has emptied that queue.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.