function cleanup(c)
%CLEANUP removes persistent information after generation

%   Copyright (c) 1997-2000 by The MathWorks, Inc.
%   $Revision: 1.6 $  $Date: 2000/06/17 15:19:45 $

sfPortal = subsref(c,substruct('.','sfportal'));
try
    sf('delete',sfPortal);
end

if mislocked( 'zsfmethods/rgstoredata' )
    %? Should we get rid of the portal?
    munlock zsfmethods/rgstoredata;
    clear zsfmethods/rgstoredata;
else
    subsasgn(c,substruct('.','initialized'),logical(0));
    subsasgn(c,substruct('.','reportList'),[]);
end