Stateflow    

Destroying Stateflow Objects

Each Stateflow object of type State, Box, Function, Note, Transition, Junction, Event, Data, or Target, has a destructor method named delete. In the following example, a State object, s, is deleted:

The preceding command is equivalent to performing a mouse select and keyboard delete operation in the Stateflow diagram editor. Upon deletion, graphical Stateflow objects are sent to the Clipboard; nongraphical objects, such as data and events, are completely deleted. The workspace variable s still exists but is no longer a handle to the deleted state.


  Establishing an Object's Parent (Container) Accessing Existing Stateflow Objects