cleanup

open fun cleanup()

Shuts down the internal state machine and frees all associated resources.