ChalonaObject class abstract
Clase base para objetos que requieren gestión automática del ciclo de vida.
Proporciona un sistema automático para:
- Registro de instancias activas
- Detección de objetos zombie
- Limpieza de recursos
Uso:
class MiConexion extends ChalonaObject {
final Socket socket;
MiConexion(this.socket) : super();
@override
void dispose() {
socket.close();
}
}
// La instancia se registra automáticamente
var conexion = MiConexion(socket);
// Verificación de estado
if (conexion.isZombie()) {
// La conexión ya fue liberada
}
Constructors
- ChalonaObject()
- Constructor que registra automáticamente la instancia.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Método que define la lógica de limpieza específica.
-
isZombie(
) → bool - Verifica si esta instancia es un zombie.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited