onReceiveDisposeInstancePair method

void onReceiveDisposeInstancePair(
  1. PairedInstance pairedInstance
)

Dispose of the pair containing pairedInstance.

Implementation

void onReceiveDisposeInstancePair(PairedInstance pairedInstance) {
  final Object? instance = getPairedObject(pairedInstance);
  assert(
    instance != null,
    'The Object with the following PairedInstance has already been disposed: $pairedInstance',
  );

  instanceManager.removeInstance(pairedInstance.instanceId);
}