开发者

is there a tool to check unused uses in delphi? [duplicate]

开发者 https://www.devze.com 2023-04-08 06:56 出处:网络
This question already has answers here: 开发者_开发百科 Closed 11 years ago. Possible Duplicate:
This question already has answers here: 开发者_开发百科 Closed 11 years ago.

Possible Duplicate:

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

is there a too that can check for unneeded uses units, that expand the project beyond its needs?

example we have

unit a; 

uses b,c;

procedure aP;
var bI:Tb;
begin
  bI := Tb.create;
  bI.free;
end;

end.

where there is no use of c. c was introduced to the project, and never being used at the project.


Yes, you can use the tool in CnPack or the one in Peganza.

Beware that even if you do not refer to a symbol defined in a unit, the inclusion of that unit can have an impact on your project. Including a unit means that code in any initialization or finalization sections runs and that can, of course, change the meaning of your program. The canonical example of this is a replacement memory manager.

The FAQ for GExperts discusses this issue and explains why they do not offer such a facility.

0

精彩评论

暂无评论...
验证码 换一张
取 消