CnPack Forum


 
Subject: [BUG]TCnButtonEdit
jAmEs_
灌水部部长
Rank: 8Rank: 8



Medal No.1  
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
Post at 2012-3-12 22:28  Profile | Blog | P.M. 
[BUG]TCnButtonEdit

这个问题N年前就发现,当时因为没有使用,没有细看,刚才使用到这个,修正一下:

增加函数:
procedure FreeBtnEdtGlyph;
var
  Kind: TButtonKind;
begin
  for Kind := Low(TButtonKind) to High(TButtonKind) do
  begin
    if BtnEdtGlyphs[Kind] <> nil then
      BtnEdtGlyphs[Kind].Free;
    BtnEdtGlyphs[Kind] := nil;
  end;
end;


修改释构函数:
destructor TCnButtonEdit.Destroy;
//var
//  Kind: TButtonKind;
begin
//  for Kind := Low(TButtonKind) to High(TButtonKind) do
//  begin
//    BtnEdtGlyphs[Kind].Free;
//    BtnEdtGlyphs[Kind] := nil;
//  end;
  inherited;
end;

//单元finalization

initialization

finalization
  FreeBtnEdtGlyph;
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2012-3-13 09:17  Profile | Blog | P.M. 
收到。查了一下,确实如此,我们疏忽了。
感谢报告。
Top
 




All times are GMT++8, the time now is 2024-11-28 09:26

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

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