MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Also, you avoid the possibility of corrupting workspace variables if an error occurs within
a function that has been passed a variable by reference.

Handle Objects


There are special kinds of objects called handles. All variables that hold copies of the
same handle can access and modify the same underlying object. Handle objects are useful
in specialized circumstances where an object represents a physical object such as a
window, plot, device, or person rather than a mathematical object like a number or
matrix.

Handle objects derive from the handle class, which provides functionality such as events
and listeners, destructor methods, and support for dynamic properties.

For more information about values and handles, see “Comparison of Handle and Value
Classes” and “Which Kind of Class to Use”.

See Also
handle

Related Examples



  • “Handle Object Behavior”

  • “Avoid Copies of Arrays in MEX Functions”

  • “Strategies for Efficient Use of Memory” on page 29-2


29 Memory Usage

Free download pdf