# hasDestroyMethod method

bool hasDestroyMethod(

1. String methodName

)

Checks whether this pod definition defines a destroy method with the given `methodName`.

This is useful for lifecycle management to determine whether cleanup should be invoked at shutdown.

### Example

    final podDef = RootPodDefinition();

    if (podDef.hasDestroyMethod("dispose")) {
      // Cleanup logic exists, handle accordingly
    }

## Implementation

    bool hasDestroyMethod(String methodName) => lifecycle.destroyMethods.contains(methodName);