isActive property

bool isActive
getter/setter pair

策略是否处于活跃状态(onStart 之后、onStop 之前)

StrategyManager 维护生命周期,子类可读取此状态判断是否应触发外部回调。 在 onStop 执行时此值已为 false,因此策略可安全地执行持久化操作 而不触发可能指向已销毁 UI 的回调。

Whether the strategy is currently active (between onStart and onStop). Managed by StrategyManager. Subclasses should check this before invoking external callbacks. When onStop is called, this is already false.

Implementation

bool isActive = false;