SmartManagement enum

Defines the memory management and instance disposal behaviors of GetX.

GetX automatically disposes unused controllers from memory using one of these configurations.

Inheritance
Available extensions

Values

full → const SmartManagement

The default management behavior.

Disposes classes that are not currently being used by any active route, unless they were marked as permanent.

onlyBuilder → const SmartManagement

Only disposes controllers started inside a builder (init parameter) or loaded via a route Binding with Get.lazyPut().

Instances created via Get.put() or other direct injection methods will not be automatically disposed.

keepFactory → const SmartManagement

Disposes dependencies when they are no longer used (similar to full), but keeps their factory/builder callback in memory.

This allows GetX to recreate the dependency on demand if it is requested again.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Constants

values → const List<SmartManagement>
A constant List of the values in this enum, in order of their declaration.