Quantcast

Documentation Center

  • Trial Software
  • Product Updates

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. 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 handle

Examples

expand all

Close a File and Release Its Resources

Use the releaseImpl method to close a file.

methods (Access=protected)
   function releaseImpl(obj)
     fclose(obj.pFileID);
   end
end

How To

Was this topic helpful?