User`s guide
Getting Started Doing Image Acquisition Programmatically
1-21
Step 7: Clean Up
When you finish using your image acquisition objects, you can remove them from
memory and clear the MATLAB workspace of the variables associated with these objects.
delete(vid)
clear
close(gcf)
For more information, see “Deleting Image Acquisition Objects” on page 5-25.