开发者

Initialization in Delphi

When compiling code without initializing a THandle the Delphi 2009 compiler gives a warning of the va开发者_开发百科riable not being initalized. Is there any need to initialize these THandles? If you need to init. them do you need to also free a THandle when you no longer need it?


You can initialize with 0 or nil, and then you don't need to Free anything.

But you'll normally want to put a 'real' handle in it, and the you usually have to Free/Close it again. The details depend on the API in question.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜