LCL: added DebugTLCLComponentDestroy

git-svn-id: trunk@54853 -
This commit is contained in:
mattias 2017-05-10 14:40:55 +00:00
parent b49b4efff4
commit c824f9135d

View File

@ -121,8 +121,12 @@ end;
destructor TLCLComponent.Destroy;
begin
{$IFNDEF DisableChecks}
if FLCLRefCount>0 then
if FLCLRefCount>0 then begin
DebugLn(['WARNING: ' + ClassName + '.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?']);
{$IFDEF DebugTLCLComponentDestroy}
DumpStack;
{$ENDIF}
end;
{$ENDIF}
{$IFDEF DebugLCLComponents}
//DebugLn('TLCLComponent.Destroy ',DbgSName(Self));