라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

delete (handle)

Handle object destructor

Syntax

delete(h)

Description

delete(h) deletes a handle object, but does not clear the handle variable from the workspace. The handle variable is not valid once the handle object has been deleted.

A subclass of handle can implement a method named delete to perform cleanup tasks just before MATLAB® destroys the handle object. MATLAB calls the delete method of any handle object (if it exists) when the object is destroyed. h is a scalar handle object.

A delete method should not generate errors or create new handles to the object being destroyed. If the delete method has a different signature (having output arguments or more than one input argument) it is not called when the handle objects is destroyed. See Handle Class Destructor information on defining destructors for handle subclasses.

Was this topic helpful?