Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

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
  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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