delete
Class:handle
Delete handle object
Syntax
delete(H)
Description
delete(
deletes the handle object. After callingH
)delete
,H
is an invalid object (the object is destroyed). IfH
is an array of handle objects, then MATLAB®calls thedelete
method on each object in the array.
Subclasses of thehandle
class can implement a method nameddelete
to perform cleanup tasks just before destroying objects of the class. MATLAB calls thedelete
method of anyhandle
object automatically when the object is destroyed. The subclassdelete
method must meet certain criteria to be called by MATLAB during object destruction. For information on implementing adelete
的一个子类的方法handle
, seeHandle Class Destructor.