# destroyDependentPods method

1. @protected

void destroyDependentPods(

1. String name

)
inherited

Destroy all pods that depend on the specified pod.

This method ensures proper destruction order by first destroying dependent pods before destroying the pod they depend on.

`name`: The name of the pod whose dependents should be destroyed

Example:

    // Before destroying UserService, destroy all pods that depend on it
    registry.destroyDependentPods('userService');

## Implementation

    @protected
    void destroyDependentPods(String name) {
      Set<String>? dependents;

      synchronized(_dependentPods, () => dependents = _dependentPods.remove(name));

      if (dependents != null) {
        for (final dependentName in dependents!) {
          destroySingleton(dependentName);
        }
      }
    }