# registerDependentPod method

1. @protected

void registerDependentPod(

1. String name,
2. String dependentName

)
inherited

Register a dependent pod for the given pod.

This method tracks dependency relationships for proper destruction ordering (dependents are destroyed before their dependencies).

`name`: The name of the pod that is depended upon `dependentName`: The name of the pod that has the dependency

Example:

    // Register that OrderService depends on UserService
    registry.registerDependentPod('userService', 'orderService');

## Implementation

    @protected
    void registerDependentPod(String name, String dependentName) {
      final canonicalName = PodUtils.transformedName(name);

      synchronized(_dependentPods, () {
        final dependents = _dependentPods.putIfAbsent(canonicalName, () => <String>{});
        if (!dependents.add(dependentName)) {
          return;
        }
      });

      synchronized(_dependenciesForPods, () {
        final dependenciesForPod = _dependenciesForPods.putIfAbsent(dependentName, () => <String>{});
        dependenciesForPod.add(canonicalName);
      });
    }