View Issue Details

IDProjectCategoryView StatusLast Update
0006626JEDI VCL00 JVCL Componentspublic2018-07-18 16:01
ReporterdummzeuchAssigned Toobones 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionwon't fix 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0006626: TFileLocator.Destroy unnecessarily moves the list entries
DescriptionJvGnuGettext.pas Line 2838:

  while filelist.count<>0 do begin
    filelist.Objects[0].Free;
    filelist.Delete (0);
  end;
  FreeAndNil (filelist);

Removes entries from the front of the list, which means they will moved for every while loop.

  for Idx := filelist.Count-1 downto 0 do
    FileList.Objects[Idx].Free;
  FreeAndNil (filelist);

Would be a bit more efficient.
TagsNo tags attached.

Activities

dummzeuch

2018-03-11 13:55

reporter   ~0021456

Actually, I see no reason to free the objects from the end, so it could simply be

for Idx := 0 to FileList.Count-1 do
  FileList.Objects[Idx].Free;

obones

2018-07-18 16:01

administrator   ~0021539

Please report this to the GnuGettext project

Issue History

Date Modified Username Field Change
2018-03-11 13:36 dummzeuch New Issue
2018-03-11 13:55 dummzeuch Note Added: 0021456
2018-07-18 16:01 obones Note Added: 0021539
2018-07-18 16:01 obones Status new => resolved
2018-07-18 16:01 obones Resolution open => won't fix
2018-07-18 16:01 obones Assigned To => obones