MATLAB Object-Oriented Programming

(Joyce) #1

Manage Object Lifecycle in Applications


MATLAB applications that use Java objects should manage the lifecycle of the objects
involved. A typical user interface application references Java objects from MATLAB
objects and creates callbacks on Java objects that reference MATLAB objects.


You can break these cyclic references in various ways:



  • Explicitly call delete on the MATLAB objects when they are no longer needed

  • Unregister the Java object callbacks that reference MATLAB objects

  • Use intermediate handle objects that reference both the Java callbacks and the
    MATLAB objects.


See Also


More About



  • “Handle Object Behavior” on page 1-9


See Also
Free download pdf