Creating a Self-Destroy Message

You create a self-destroy message from the Toolbox.

  1. Click the Message tool in the Toolbox.
  2. Click the lifeline of the sender object and, while holding down the mouse button, drag the cursor towards the lifeline of the receiver object.
  3. Release the mouse button on the object symbol of the receiver, and then double-click the newly created message symbol to display its property sheet.
  4. Select Self-Destroy from the Action list in the Detail tab.
  5. Select Return from the Control flow list.
  6. Click OK. The lifeline of the self-destroyed object is marked by an X.