Class AdUnitStateMachine
-
- All Implemented Interfaces:
-
com.inmobi.media.ads.common.listeners.AUDestroyListener
public abstract class AdUnitStateMachine extends StateMachine implements AUDestroyListener
An abstract base class for managing the state and lifecycle of an ad unit.
This class provides a state machine implementation for ad units, allowing them to transition between different states and perform actions based on those states. It also implements the AUMDestroyListener interface to handle cleanup when the ad unit is being destroyed.
-
-
Constructor Summary
Constructors Constructor Description AdUnitStateMachine(AdComponent adComponent)
-
Method Summary
-
-
Constructor Detail
-
AdUnitStateMachine
AdUnitStateMachine(AdComponent adComponent)
-
-
Method Detail
-
onDestroy
Unit onDestroy()
Called when an ad unit is being destroyed and requires cleanup.
This method is invoked when the ad unit lifecycle is ending and all associated resources should be released. The method is suspending to allow for asynchronous cleanup operations such as cancelling coroutines, releasing network connections, or performing database cleanup. Implementers should ensure all resources are properly cleaned up to prevent memory leaks.
-
-
-
-