Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

releaseImpl

Class: matlab.System
Package: matlab

Release resources

Syntax

releaseImpl(obj)

Description

releaseImpl(obj) releases any resources used by the System object™, such as file handles or devices. This method also performs any necessary cleanup tasks. To release resources for a System object, you must use releaseImpl instead of a destructor.

releaseImpl is called by the release method. releaseImpl is also called when the object is deleted or cleared from memory, or when all references to the object have gone out of scope.

    Note:   You must set Access = protected for this method.

Input Arguments

obj

System object

Examples

expand all

Use the releaseImpl method to close a file opened by the System object.

methods (Access = protected)
   function releaseImpl(obj)
     fclose(obj.pFileID);
   end
end
Was this topic helpful?