增加函数:
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;