close.m

来自「Video IO toolbox for matlab. 用directsho」· M 代码 · 共 37 行

M
37
字号
function vr = close(vr)
%VR=CLOSE(VR)
%  Closes video VR and releases any system resources necessary to access it
%  (e.g. threads, file handles, etc.).  Do NOT just clear a videoReader
%  object without first closing its handle.
%
%  Examples:
%    % BAD code--typically will leak system resources
%    vr = videoReader(...);
%    ...
%    clear vr; % leaks resources
%
%    % GOOD code
%    vr = videoReader(...);
%    vr = close(vr);
%    clear vr; % okay, but not needed
%
%  After calling CLOSE, VR should not be used any more.
%
%  Example:
%    vr = videoReader(...);
%    vr = close(vr);
%    next(vr); % BAD
%    vr = videoReader(...);
%    close(vr); % BAD: should reassign result to vr to be safe
%    next(vr); % BAD
%  
%SEE ALSO
%  videoReader
%
%Copyright (c) 2006 Gerald Dalley
%See "MIT.txt" in the installation directory for licensing details (especially
%when using this library on GNU/Linux). 

feval(vr.plugin, 'close', vr.handle);
vr.handle = nan;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?