📄 sl_free.m
字号:
function head=sl_free(sl)
% SL_FREE
%
% head=SL_FREE(sl) frees the memory allocated to the singly linked
% list head.
% Copyright (c) MathWorks Inc. 1998-2001. All rights reserved.
if nargin<1
error('one input argument required.');
end
if nargout<1
error('one output argument required.');
end
head=sl.head;
while head~=0
headnext=head.next;
free(head);
head=headnext;
end
sl.head=0;
sl.tail=0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -