# registerDisposablePod method

1. @protected

void registerDisposablePod(

1. String name,
2. DisposablePod pod, [
3. String? qualifiedName

])
inherited

Register a disposable pod for the given pod name.

This method is used to register a pod that implements the DisposablePod interface, allowing it to be destroyed when the registry is destroyed.

`name`: The name of the pod to register `pod`: The pod to register

Example:

    final userService = UserService();
    // Perform dependency injection and initialization
    injectDependencies(userService);
    initializePod(userService);

    registry.registerDisposablePod('userService', userService);

## Implementation

    @protected
    void registerDisposablePod(String name, DisposablePod pod, [String? qualifiedName]) {
    		return synchronized(_disposablePods, () {
        _disposablePods.put(name, ObjectHolder<Object>(pod, packageName: pod.getPackageName(), qualifiedName: qualifiedName));
      });
    	}