CnPack Forum


 
Subject: comserv.pas 有内存泄漏。
circus_monkey
新警察
Rank: 1



UID 140
Digest Posts 0
Credits 2
Posts 2
点点分 2
Reading Access 10
Registered 2003-8-22
Status Offline
Post at 2003-9-2 16:34  Profile | Blog | P.M. 
comserv.pas 有内存泄漏。

如果在project中先加入cnMemProf(内存泄漏检测单元)
然后在调用 uses ComServ;
即使不写任何的其他语句,在退出的时候还是会出现一处内存泄漏。
其问题代码如下:
==============================================
initialization
begin
  OleAutHandle := SafeLoadLibrary('OLEAUT32.DLL');
  ComServer := TComServer.Create;
  if not ModuleIsLib then
  begin
    SaveInitProc := InitProc;
    InitProc := @InitComServer;
    AddTerminateProc(@AutomationTerminateProc);
  end;
end;

finalization
begin
  ComServer.Free;
  ComServer := nil;
  FreeLibrary(OleAutHandle);
end;
============================================
但是还没有找到解决的办法。
Top
 




All times are GMT++8, the time now is 2024-3-29 23:40

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007037 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP