Skip to Main Content Skip to Search
Product Documentation

delete (handle) - Handle object destructor function

Syntax

delete(h)

Description

delete(h) optional method you can implement to perform cleanup tasks just before the handle object is destroyed. The MATLAB runtime 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 Delete Methods for more information.

See Also

handle | isvalid

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS