Historically, when a state machine uses a template and wants to remove a
state or transition it will just set a guard that always returns false.
This isn't a particularly neat solution since the states and transitions
still exist on the state machine, and can make inspecting the internals
of the state machine return misleading information.
This change adds explicit methods to allow a state machine to delete
states or transitions. When a state is deleted, all related transitions
and callbacks will also be cleaned up as appropriate.
Historically, when a state machine uses a template and wants to remove a state or transition it will just set a guard that always returns false. This isn't a particularly neat solution since the states and transitions still exist on the state machine, and can make inspecting the internals of the state machine return misleading information.
This change adds explicit methods to allow a state machine to delete states or transitions. When a state is deleted, all related transitions and callbacks will also be cleaned up as appropriate.