mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:28:19 +02:00
DialogRes: destroy DialogGlyphs with interface finalization. solves issue #40015
This commit is contained in:
parent
74dfcb9fd5
commit
4d8f933b50
@ -5,7 +5,7 @@ unit DialogRes;
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLType, Graphics, Themes, Controls, ImgList, InterfaceBase, LCLIntf, SysUtils, Classes;
|
||||
LCLType, Graphics, Themes, Controls, ImgList, InterfaceBase, LCLIntf, LCLProc, SysUtils, Classes;
|
||||
|
||||
type
|
||||
TDialogImage = idDialogWarning..idDialogShield;
|
||||
@ -107,8 +107,13 @@ begin
|
||||
fDialogIndexes[AIndex] := GetImageIndex(DialogResName[AIndex]);
|
||||
end;
|
||||
|
||||
finalization
|
||||
procedure InterfaceFinal;
|
||||
begin
|
||||
FreeAndNil(DialogImages);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterInterfaceFinalizationHandler(@InterfaceFinal);
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user