📄 main.pas
字号:
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('TCPIP')] then begin
Log('TCPIP.Create...');
hss:=GetHeapStatus;
with TMiTeC_TCPIP.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('TCPIP.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('TCPIP.SaveToStorage...');
SaveToStorage(ss);
Log('TCPIP.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('TCPIP.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('Network')] then begin
Log('Network.Create...');
hss:=GetHeapStatus;
with TMiTeC_Network.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('Network.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('Network.SaveToStorage...');
SaveToStorage(ss);
Log('Network.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('Network.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('Media')] then begin
Log('Media.Create...');
hss:=GetHeapStatus;
with TMiTeC_Media.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('Media.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('Media.SaveToStorage...');
SaveToStorage(ss);
Log('Media.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('Media.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('Internet')] then begin
Log('Internet.Create...');
hss:=GetHeapStatus;
with TMiTeC_Internet.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('Internet.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('Internet.SaveToStorage...');
SaveToStorage(ss);
Log('Internet.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('Internet.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('LocaleInfo')] then begin
Log('LocaleInfo.Create...');
hss:=GetHeapStatus;
with TMiTeC_LocaleInfo.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('LocaleInfo.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('LocaleInfo.SaveToStorage...');
SaveToStorage(ss);
Log('LocaleInfo.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('LocaleInfo.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('NTSpecific')] then begin
Log('NTSpecific.Create...');
hss:=GetHeapStatus;
with TMiTeC_NTSpecific.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('NTSpecific.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('NTSpecific.SaveToStorage...');
SaveToStorage(ss);
Log('NTSpecific.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('NTSpecific.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('TimeZone')] then begin
Log('TimeZone.Create...');
hss:=GetHeapStatus;
with TMiTeC_TimeZone.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('TimeZone.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('TimeZone.SaveToStorage...');
SaveToStorage(ss);
Log('TimeZone.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('TimeZone.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('OS')] then begin
Log('OS.Create...');
hss:=GetHeapStatus;
with TMiTeC_OperatingSystem.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('OS.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('OS.SaveToStorage...');
SaveToStorage(ss);
Log('OS.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('OS.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('Storage')] then begin
Log('Storage.Create...');
hss:=GetHeapStatus;
with TMiTeC_Storage.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('Storage.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('Storage.SaveToStorage...');
SaveToStorage(ss);
Log('Storage.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('Storage.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('DirectX')] then begin
Log('DirectX.Create...');
hss:=GetHeapStatus;
with TMiTeC_DirectX.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('DirectX.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('DirectX.SaveToStorage...');
SaveToStorage(ss);
Log('DirectX.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('DirectX.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('ASPI32')] then begin
Log('ASPI32.Create...');
hss:=GetHeapStatus;
with TMiTeC_ASPI32.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('ASPI32.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('ASPI32.SaveToStorage...');
SaveToStorage(ss);
Log('ASPI32.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('ASPI32.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('Engines')] then begin
Log('Engines.Create...');
hss:=GetHeapStatus;
with TMiTeC_Engines.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('Engines.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
Log('Engines.SaveToStorage...');
SaveToStorage(ss);
Log('Engines.LoadFromStorage...');
LoadFromStorage(ss);
end;
Log('Engines.Destroy...');
Free;
hsf:=GetHeapStatus;
if hsf.TotalAllocated>hss.TotalAllocated then begin
tl:=tl+hsf.TotalAllocated-hss.TotalAllocated;
Log(Format('*MEMORY LEAK = %d B',[hsf.TotalAllocated-hss.TotalAllocated]));
end;
Log('');
end;
end;
except on e: Exception do begin
Inc(ec);
Log(Format('*ERROR = %s'#13#10,[e.Message]));
end end;
try
if clb.Checked[clb.Items.IndexOf('APM')] then begin
Log('APM.Create...');
hss:=GetHeapStatus;
with TMiTeC_APM.Create(nil) do begin
onDebug:=MiTeC_Debug;
//ExceptionModes:=[emExceptionStack,emJournal];
Log('APM.RefreshData...');
RefreshData;
if cbxReport.Checked then begin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -