This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Remove image acquisition object from memory




delete(obj) removes obj, an image acquisition object or array of image acquisition objects, from memory. Use delete to free memory at the end of an image acquisition session.

If obj is an array of image acquisition objects and one of the objects cannot be deleted, the delete function deletes the objects that can be deleted and returns a warning.

When obj is deleted, it becomes invalid and cannot be reused. Use the clear command to remove invalid image acquisition objects from the MATLAB® workspace.

If multiple references to an image acquisition object exist in the workspace, deleting the image acquisition object invalidates the remaining references. Use the clear command to delete the remaining references to the object from the workspace.

If the image acquisition object obj is running or being previewed, the delete function stops the object and closes the preview window before deleting it.


Create a video object, preview the object, then delete the object:

vid = videoinput('winvideo', 1);

Introduced before R2006a