GC.CancelFullGCNotification Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cancels the registration of a garbage collection notification.
public:
static void CancelFullGCNotification();
public static void CancelFullGCNotification ();
[System.Security.SecurityCritical]
public static void CancelFullGCNotification ();
static member CancelFullGCNotification : unit -> unit
[<System.Security.SecurityCritical>]
static member CancelFullGCNotification : unit -> unit
Public Shared Sub CancelFullGCNotification ()
- Attributes
Exceptions
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.
Examples
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();
finalExit = true;
checkForNotify = false;
GC.CancelFullGCNotification();
finalExit <- true
checkForNotify <- false
GC.CancelFullGCNotification()
finalExit = True
checkForNotify = False
GC.CancelFullGCNotification()
Remarks
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.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈