GC.CancelFullGCNotification Metod

Definition

Avbryter registreringen av en skräpinsamlingsavisering.

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 ()
Attribut

Undantag

Den här medlemmen är inte tillgänglig när samtidig skräpinsamling är aktiverad. Mer information om hur du inaktiverar samtidig skräpinsamling finns i <gcConcurrent-körningsinställningen> .

Exempel

I följande exempel avbryts en registrering av skräpinsamling. Det här exemplet är en del av ett större exempel för avsnittet Skräpinsamlingsaviseringar .

finalExit = true;
checkForNotify = false;
GC.CancelFullGCNotification();
finalExit <- true
checkForNotify <- false
GC.CancelFullGCNotification()
finalExit = True
checkForNotify = False
GC.CancelFullGCNotification()

Kommentarer

Den här metoden avbryter ett meddelande om skräpinsamling som har registrerats med hjälp RegisterForFullGCNotification av metoden. Du behöver inte anropa den här metoden innan du justerar tröskelvärdet för parametervärden i efterföljande anrop till RegisterForFullGCNotification metoden.

Gäller för

Se även