Propiedad GCHandle.IsAllocated
Publicado: octubre de 2016
Obtiene un valor que indica si el identificador está asignado.
Espacio de nombres: System.Runtime.InteropServices
Ensamblado: mscorlib (en mscorlib.dll)
Sintaxis
public bool IsAllocated { get; }
public:
property bool IsAllocated {
bool get();
}
member IsAllocated : bool with get
Public ReadOnly Property IsAllocated As Boolean
Valor de propiedad
Type: System.Boolean
Es true si el identificador está asignado; en caso contrario, es false.
Comentarios
Use this property when using F:System.Runtime.InteropServices.GCHandleType.Weak handles to determine if the T:System.Runtime.InteropServices.GCHandle is still available. When the garbage collector collects the object, the F:System.Runtime.InteropServices.GCHandleType.Weak handle can still be resurrected in the finalizer. In that case, the handle is not allocated (it is lost when the garbage collector attempts to collect the object), even though the target object is valid.
Información de versión
Plataforma universal de Windows
Disponible desde 8
.NET Framework
Disponible desde 1.1
Biblioteca de clases portable
Se admite en: plataformas portátiles de .NET
Silverlight
Disponible desde 2.0
Windows Phone Silverlight
Disponible desde 7.0
Windows Phone
Disponible desde 8.1
Ver también
GCHandleType
Estructura GCHandle
Espacio de nombres System.Runtime.InteropServices
Volver al principio