User`s guide

Managing Memory Usage
5 Empty the entire memory buffer —Callingflushdata without
specifying the m ode deletes all the frames s tored in memory.
flushdata(vid);
To verify that the object deleted the frames, view the value of the
FramesAvailable property.
vid.FramesAvailable
ans =
0
6 Clean up Always rem ove image acquisition objects from mem ory, and
the variables that re ference them, when you n o longer need them.
delete(vid)
clear vid
5-39