getInstance method
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);
}