Clearing a particular class definition from memory
Mostra commenti meno recenti
I know that `clear classes` will clear all classes from memory, but I cannot find a way to clear one particular class. Entering
>> clear classname
does not work. Is there a way to do this?
In other forums, clearing all instances of the class, either manually or by automated means, has been proposed. This doesn't work however, as the following example shows. The constant property data remains.
classdef myclass
properties (Constant)
prop=17;
end
end
>> obj=myclass; myclass.prop
ans =
17
>> clear obj; myclass.prop
ans =
17
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Handle Classes in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!