GC.RegisterNoGCRegionCallback(Int64, Action) Método

Definição

Regista um callback a ser invocado quando uma certa quantidade de memória é alocada na região sem GC.

public:
 static void RegisterNoGCRegionCallback(long totalSize, Action ^ callback);
public static void RegisterNoGCRegionCallback(long totalSize, Action callback);
static member RegisterNoGCRegionCallback : int64 * Action -> unit
Public Shared Sub RegisterNoGCRegionCallback (totalSize As Long, callback As Action)

Parâmetros

totalSize
Int64

O tamanho total da região sem GC.

callback
Action

O callback deve ser executado quando uma certa quantidade de memória é alocada na região sem GC.

Exceções

totalSize é menor ou igual a 0.

O callback argumento é null.

O GC não está atualmente sob uma região NoGC.

-ou-

Já está registada outra chamada de retorno.

-ou-

O totalSize excede o tamanho da região No GC.

-ou-

A operação para reter memória para o callback falhou.

Aplica-se a