destroy

suspend fun StateMachine.destroy(stop: Boolean = true)

Destroys machine structure clearing all listeners, states etc. This a terminal operation, means that machine cannot be used anymore.