disposeId method

  1. @protected
void disposeId (String id, String groupName)
@protected

Remove the object with the specified id from the specified object group.

If the object exists in other groups it will remain alive and the object id will remain valid.

Implementation

@protected
void disposeId(String id, String groupName) {
  if (id == null)
    return;

  final _InspectorReferenceData referenceData = _idToReferenceData[id];
  if (referenceData == null)
    throw FlutterError('Id does not exist');
  if (_groups[groupName]?.remove(referenceData) != true)
    throw FlutterError('Id is not in group');
  _decrementReferenceCount(referenceData);
}