@ Eweiss:
Gerade habe ich mir dein Tool PrivFramesWriter nochmal genau angeschaut. Dabei fiel mir auf, dass du eine Stringlist instantiierst, aber nicht freigibst:
Delphi-Quellcode:
procedure TForm1.btnSearchClick(Sender: TObject);
var
List: TStringList;
IntI: Integer;
Mask: array[0..0] of string;
begin
edSearchpath.Text := GetFolder(CSIDL_DRIVES, 'Select search path');
lstSearch.Clear;
If edSearchpath.Text <> '' then
begin
Mask[0] := '.mp3';
List := TStringList.Create;
FindMediaFiles(List, edSearchpath.Text, Mask, True);
lblCount.Caption := IntToStr(List.Count);
ProgressCounter:= List.Count;
lblProgress.Caption := IntToStr(ProgressCounter);
if List.Count > 0 then
begin
btnDoIt.Enabled := true;
Setlength(failed, List.Count);
end;
for IntI := 0 to List.Count - 1 do
lstSearch.Items.Add(List[IntI]);
end;
end;
Sollte das nicht so aussehen:
Delphi-Quellcode:
procedure TForm1.btnSearchClick(Sender: TObject);
var
List: TStringList;
IntI: Integer;
Mask: array[0..0] of string;
begin
edSearchpath.Text := GetFolder(CSIDL_DRIVES, 'Select search path');
lstSearch.Clear;
List := TStringList.Create;
try
If edSearchpath.Text <> '' then
begin
Mask[0] := '.mp3';
FindMediaFiles(List, edSearchpath.Text, Mask, True);
lblCount.Caption := IntToStr(List.Count);
ProgressCounter:= List.Count;
lblProgress.Caption := IntToStr(ProgressCounter);
if List.Count > 0 then
begin
btnDoIt.Enabled := true;
Setlength(failed, List.Count);
end;
for IntI := 0 to List.Count - 1 do
lstSearch.Items.Add(List[IntI]);
end;
finally
FreeAndNil(List)
end;
end;
Gruß LP