D
dirk
Unregistered / Unconfirmed
GUEST, unregistred user!
什么是“引用计数”?在form3的onclose事件中加上Action:=caFree是否可以?
我看了帮助,有这样的一段:
var
SaveExit: Pointer;
procedure LibExit;
begin
CoUninitialize
// library exit code
ExitProc := SaveExit
// restore exit procedure chain
end;
begin
SaveExit := ExitProc
// save exit procedure chain
ExitProc := @LibExit
// install LibExit exit procedure
end.
就帮助上说的,应该是dll的释放部分:
When a DLL is unloaded, the library's exit procedures are executed by repeated calls to the address stored in ExitProc, until ExitProc becomes nil. The initialization parts of all units used by a library are executed before the library's initialization code, and the finalization parts of those units are executed after the library's exit procedure.
但就我跟踪看来,这个LibExit根本就没有执行,那么ExitProc到底该怎么用呢?
我看了帮助,有这样的一段:
var
SaveExit: Pointer;
procedure LibExit;
begin
CoUninitialize
// library exit code
ExitProc := SaveExit
// restore exit procedure chain
end;
begin
SaveExit := ExitProc
// save exit procedure chain
ExitProc := @LibExit
// install LibExit exit procedure
end.
就帮助上说的,应该是dll的释放部分:
When a DLL is unloaded, the library's exit procedures are executed by repeated calls to the address stored in ExitProc, until ExitProc becomes nil. The initialization parts of all units used by a library are executed before the library's initialization code, and the finalization parts of those units are executed after the library's exit procedure.
但就我跟踪看来,这个LibExit根本就没有执行,那么ExitProc到底该怎么用呢?