jAmEs_
灌水部部长
UID 886
Digest Posts
0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5 Location 广东
Status Offline
|
|
[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;
|
|
|