Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GC::CancelFullGCNotification Method ()

 

Cancels the registration of a garbage collection notification.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
[SecurityCriticalAttribute]
static void CancelFullGCNotification()

Exception Condition
InvalidOperationException

This member is not available when concurrent garbage collection is enabled. See the <gcConcurrent> runtime setting for information about how to disable concurrent garbage collection.

This method cancels a garbage collection notification that was registered by using the RegisterForFullGCNotification method. You do not have to call this method before adjusting threshold parameter values in subsequent calls to the RegisterForFullGCNotification method.

The following example cancels a garbage collection registration. This example is part of a larger example provided for the Garbage Collection Notifications topic.

finalExit = true;
checkForNotify = false;
GC::CancelFullGCNotification();

LinkDemand

for full trust for the immediate caller. This member cannot be used by partially trusted code.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft