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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應