# requiresDestruction method

1. @protected

Future<bool> requiresDestruction(

1. Object pod,
2. RootPodDefinition root

)

Checks if a pod requires destruction.

This method determines whether a pod requires destruction based on its type and the presence of destruction pod post-processors.

`pod` the pod to check `root` the root pod definition to check Returns `true` if the pod requires destruction, `false` otherwise

## Implementation

    @protected
    Future<bool> requiresDestruction(Object pod, RootPodDefinition root) async {
      bool notNullable = root.type != NullablePod;
      bool hasProcessors = hasDestructionPodPostProcessors() && await DisposableLifecycleManager.hasApplicableProcessors(pod, root, getPodProcessorCacheManager().destruction);

    		return notNullable && (DisposableLifecycleManager.hasDestroyMethod(pod, root) || hasProcessors);
    	}