dispose method

  1. @override
bool dispose()
override

Release the resources associated with this source.

Implementation

@override
bool dispose() {
  if (_syncStateTimer != null) {
    _syncStateTimer!.cancel();
    _syncStateTimer = null;
  }

  // obslib.removeSourceFrameCallback(trackingUUID, pointer.address);
  obslib.releaseSource(pointer!);
  releaseController();

  if (volumeMeter != null) {
    volumeMeter!.dispose();
    volumeMeter = null;
  }

  super.dispose();
  return true;
}