This is a static copy of a profile reportHome
close>request_close (35 calls, 0.359 sec)
Generated 15-Mar-2007 12:01:47 using real time.
M-subfunction in file C:\Program Files\MATLAB71\toolbox\matlab\graphics\close.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Function Name | Function Type | Calls |
close | M-function | 35 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
173 | eval(crf) | 46 | 0.313 s | 87.0% |  |
151 | persistent in_request_close; | 35 | 0.016 s | 4.3% |  |
153 | numFig=length(h); | 35 | 0.000 s | 0.0% |  |
156 | waserr=0; | 35 | 0.000 s | 0.0% |  |
171 | in_request_close = 1; | 46 | 0.000 s | 0.0% |  |
Other lines & overhead | | | 0.031 s | 8.7% |  |
Totals | | | 0.359 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
closereq | M-function | 46 | 0.281 s | 78.3% |  |
Self time (built-ins, overhead, etc.) | | | 0.078 s | 21.7% |  |
Totals | | | 0.359 s | 100% | |
M-Lint results
Line number | Message |
156 | The value assigned here to variable 'waserr' might never be used. |
186 | ERROR takes SPRINTF-like arguments directly. |
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 45 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 35 |
Code lines that did run | 22 |
Code lines that did not run | 13 |
Coverage (did run/can run) | 62.86 % |
Function listing
time calls line
150 function status = request_close(h)
0.02 35 151 persistent in_request_close;
< 0.01 35 152 status = 1;
< 0.01 35 153 numFig=length(h);
35 154 hhmode = get(0,'showhiddenhandles');
35 155 set(0,'showhiddenhandles','on')
< 0.01 35 156 waserr=0;
35 157 for lp = 1:numFig,
46 158 if ishandle(h(lp))
46 159 set(0,'CurrentFigure',h(lp));
46 160 crf = get(h(lp),'CloseRequestFcn');
161 % prevent recursion
46 162 if (in_request_close)
163 % Throw the warning. Allow users to turn off the warning using
164 % the new ID.
165 warning('MATLAB:Figure:RecursionOnClose', ...
166 'A callback recursively calls CLOSE. Use DELETE to prevent this message.');
167 delete(h)
168 in_request_close = 0;
46 169 else
46 170 try
< 0.01 46 171 in_request_close = 1;
46 172 if ischar(crf)
0.31 46 173 eval(crf)
174 elseif iscell(crf)
175 % fcn pointer call backs are called like this
176 % fcn obj evd other args
177 feval(crf{1}, h(lp), [], crf{2:end});
178 elseif isa(crf,'function_handle')
179 feval(crf, h(lp), []);
180 end
< 0.01 46 181 in_request_close = 0;
182 catch
183 in_request_close = 0;
184 % Restore ShowHiddenHandles flag before erroring out
185 set(0,'showhiddenhandles',hhmode);
186 error(sprintf('Error while evaluating figure CloseRequestFcn\n\n%s', lasterr));
187 end
46 188 end
46 189 end
46 190 if ishandle(h(lp)), status = 0; end
46 191 end
35 192 set(0,'showhiddenhandles',hhmode);
193
194 %------------------------------------------------
Other subfunctions in this file are not included in this listing.