开发者

is there a tool to check unused uses in delphi? [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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜