GcNotification Class

Registers a callback that fires each time a Gen2 garbage collection occurs, presumably due to memory pressure. For this to work no components can have a reference to the instance.

Namespace
Microsoft.Extensions.Internal
Assemblies
  • Microsoft.Extensions.Caching.Memory

Syntax

public class GcNotification
class Microsoft.Extensions.Internal.GcNotification

Methods

Finalize()
protected void Finalize()
Register(System.Func<System.Object, System.Boolean>, System.Object)
public static void Register(Func<object, bool> callback, object state)