SafeHandle.SetHandleAsInvalid Método

Definição

Marca um identificador como não mais usado.Marks a handle as no longer used.

public:
 void SetHandleAsInvalid();
[System.Security.SecurityCritical]
public void SetHandleAsInvalid ();
public void SetHandleAsInvalid ();
[<System.Security.SecurityCritical>]
member this.SetHandleAsInvalid : unit -> unit
member this.SetHandleAsInvalid : unit -> unit
Public Sub SetHandleAsInvalid ()
Atributos

Comentários

Chame o SetHandleAsInvalid método somente quando souber que seu identificador não faz mais referência a um recurso.Call the SetHandleAsInvalid method only when you know that your handle no longer references a resource. Isso não altera o valor do handle campo; ele marca apenas o identificador como fechado.Doing so does not change the value of the handle field; it only marks the handle as closed. O identificador pode então conter um valor potencialmente obsoleto.The handle might then contain a potentially stale value. O efeito dessa chamada é que nenhuma tentativa é feita para liberar os recursos.The effect of this call is that no attempt is made to free the resources.

Assim como com o SetHandle método, use SetHandleAsInvalid somente se você precisar dar suporte a um identificador já existente.As with the SetHandle method, use SetHandleAsInvalid only if you need to support a pre-existing handle.

Aplica-se a