handle.delete - Delete handle object - MATLAB (original) (raw)
Main Content
Class: handle
Description
delete([H](#bultbx%5F-1-h))
deletes the handle object. After calling delete
, H
is an invalid object (the object is destroyed). If H
is an array of handle objects, then MATLABĀ® calls the delete
method on each object in the array.
Subclasses of the handle
class can implement a method named delete
to perform cleanup tasks just before destroying objects of the class. MATLAB calls the delete
method of any handle
object automatically when the object is destroyed. The subclass delete
method must meet certain criteria to be called by MATLAB during object destruction. For information on implementing a delete
method for a subclass of handle
, see Handle Class Destructor.
Input Arguments
Handle object to delete, specified as the handle variable.