# onDestroy abstract method

Future<void> onDestroy()

Interface to be implemented by pods that need to release resources or perform cleanup when being removed from the container or shut down.

Typically used to close file streams, database connections, or other disposable resources.

### Usage Example:

    class MyService implements DisposablePod {
      @override
      void onDestroy() {
        print('Cleaning up resources');
      }
    }

The container should call `onDestroy()` during shutdown or pod destruction phase.

## Implementation

    Future<void> onDestroy();