clear method

void clear()

Clears the logic instance and associated data.

Implementation

void clear() {
  Utils.registeredLogics.remove(toString());
  for (var listener in _listeners) {
    listener();
  }
  _listeners.clear(); // Clear all listeners
  infoLog("Disposed.");
  onClear();
}