Date: Jun 28, 2013 11:36 AM
Author: Steven Lord
Subject: Re: Update and Delete listeners



"kees de Kapper" <kees_de_kapper@hotmail.com> wrote in message
news:kqk6jm$on1$1@newscl01ah.mathworks.com...
> Hi All,
>
> I have been playing a little with events and listeners and came up with a
> usable implementation to update my object, etc. However, what I would like
> to have as well, is a listener of the event that the object is (going to
> be) destroyed/deleted. I would like to have the possibility to clean up
> several dependencies just before deletion.
>
> I cannot find some an event like 'Delete' or what so ever. Have I missed
> something.


Create a DELETE method for your object. Clean up the dependencies in that
method.

http://www.mathworks.com/help/matlab/matlab_oop/handle-class-destructors.html

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com