Deleting Timer Objects from Memory

Deleting One or More Timer Objects

When you are finished with a timer object, delete it from memory using the delete function:

delete(t)

When you delete a timer object, workspace variables that referenced the object remain. Deleted timer objects are invalid and cannot be reused. Use the clear command to remove workspace variables that reference deleted timer objects.

To remove all timer objects from memory, enter

delete(timerfind)

For information about the timerfind function, see Finding Timer Objects in Memory.

Testing the Validity of a Timer Object

To test if a timer object has been deleted, use the isvalid function. The isvalid function returns logical 0 (false) for deleted timer objects:

isvalid(t)
ans =

     0
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS