0

I am writing a basic GUI using classes in MATLAB. It involves basic uicontrols() and GridLayout components. Normally, if I close the figure and issue a 'clear classes' everything is fine. However, if I inspect the figure created by the class, it seems to keep the objects around to where I cannot clear them. So far, the only solution I have found is to restart MATLAB.

Concerning my code, I do not store references to my class in any controls via 'UserData'.

Has anyone else ran into this sort of problem? Is there another solution to this?

eacousineau
  • 3,457
  • 3
  • 34
  • 37

1 Answers1

0

That sounds very odd, and I cannot reproduce this. Using the following code,

h = figure();
o1 = uicontrol('Style','text','String','hello','position',[ 10 20 80 20]); 
o2 = uicontrol('Style','edit','String','hello','position',[110 20 80 20]); 

inspect(h);

if I close the window, the inspect window goes completely blank. Try this out.

eykanal
  • 26,437
  • 19
  • 82
  • 113