How can I identify and get rid of unused units in the “uses clause” in Delphi 7?

后端 未结 7 691
北海茫月
北海茫月 2020-12-03 14:44

This should reduce the executable size quite a bit in some of my very large projects. I am sure there would be other benefits too.

EDIT: Is there perhaps a utility t

7条回答
  •  攒了一身酷
    2020-12-03 15:13

    I used to use Icarus that gave me a report of unused uses entries.

    From the web page

    ICARUS parses Delphi or Borland Pascal source code and generates a Uses Report. This report will help you remove unneeded units from your uses lists. You will also know which units that can be moved from the interface uses list to the implementation uses list.

    Removing unused uses references has multiple benefits: Cleaner code to maintain, no need to bother about code that is not used Code from initialization and finalization sections in unused units is not linked in Compilation runs smoother and quicker

    ICARUS is very easy to use, just select a source file, set a few options, and start analyzing. Or let the built-in wizard guide you through this process.

    ICARUS is FREEWARE.

提交回复
热议问题