dispose method

void dispose()

Implementation

void dispose() {
  for (final timer in _activeTimers) {
    timer.realTimer?.cancel();
    _lua.unRef(luaRegistryIndex, timer.luaCallbackRef);
  }
  _activeTimers.clear();
  for (final refId in _registeredCallbackRefs) {
    _lua.unRef(luaRegistryIndex, refId);
  }
  _registeredCallbackRefs.clear();
}