function ScreenLeakTest
% ScreenLeakTest measures memory leakage associated with opening and 
% closing windows.

% ?/??/?? dgp Wrote it
% 4/24/02 awi Exit on PC with message.

if strcmp('PCWIN',computer)
    error('Win: ScreenLeakTest not yet supported.');
end

clear all
bytes;
fprintf('%8ld free, %8ld temp free. After initial CLEAR ALL.\n',bytes,bytes('TempFree'));
screen('windows');
fprintf('%8ld free, %8ld temp free. After Screen(''windows'').\n',bytes,bytes('TempFree'));
% whichScreen=0;
%window=QT('OpenWindow',whichScreen);
Screen(0,'OpenWindow');
Screen(0,'OpenOffscreenWindow');
fprintf('%8ld free, %8ld temp free. After Screen(''OpenWindow'').\n',bytes,bytes('TempFree'));
%QT('CloseWindow',window);
Screen('CloseAll');
fprintf('%8ld free, %8ld temp free. After Screen(''CloseAll'').\n',bytes,bytes('TempFree'));
%screen close?
clear all
bytes;
fprintf('%8ld free, %8ld temp free. After CLEAR ALL.\n',bytes,bytes('TempFree'));
