getInstance method

Object? getInstance(
  1. String instanceId
)

Retrieve the Object paired with instanceId.

Returns null if this instanceId is not paired.

Implementation

Object? getInstance(String instanceId) {
  if (_temporaryStrongReferences.containsKey(instanceId)) {
    return _temporaryStrongReferences.remove(instanceId);
  }
  return _strongReferences[instanceId] ?? _weakReferences.get(instanceId);
}