Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006626 [JEDI VCL] 00 JVCL Components minor have not tried 2018-03-11 13:36 2018-07-18 16:01
Reporter dummzeuch View Status public  
Assigned To obones
Priority normal Resolution won't fix  
Status resolved   Product Version Daily / GIT
Summary 0006626: TFileLocator.Destroy unnecessarily moves the list entries
Description JvGnuGettext.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.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0021456)
dummzeuch (reporter)
2018-03-11 13:55

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;
(0021539)
obones (administrator)
2018-07-18 16:01

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker