matlab.System.releaseImpl - Release resources - MATLAB (original) (raw)
Main Content
Class: matlab.System
Description
releaseImpl([obj](#bs4onyc-1%5Fsep%5Fmw%5F353aa417-3412-46f8-81f1-586adf7da5a8))
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.
Run-Time Details
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. For details, see Detailed Call Sequence.
Method Authoring Tips
You must set Access = protected
for this method.
Input Arguments
System object handle used to access properties, states, and methods specific to the object. If your releaseImpl
method does not use the object, you can replace this input with ~
.
Examples
Use the releaseImpl
method to close a file opened by the System object.
methods (Access = protected) function releaseImpl(obj) fclose(obj.pFileID); end end
Version History
Introduced in R2011b