From 7ee61fd3025f8e43d15cfa203bc4c07a23b15993 Mon Sep 17 00:00:00 2001 From: david berneda Date: Wed, 2 Oct 2024 19:10:18 +0200 Subject: [PATCH] Small addition try finally --- demos/VCL/Header_Footer/Unit_Header_Footer.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/demos/VCL/Header_Footer/Unit_Header_Footer.pas b/demos/VCL/Header_Footer/Unit_Header_Footer.pas index 748b36a..f36cf6f 100644 --- a/demos/VCL/Header_Footer/Unit_Header_Footer.pas +++ b/demos/VCL/Header_Footer/Unit_Header_Footer.pas @@ -40,8 +40,11 @@ procedure TFormHeaderFooter.Button1Click(Sender: TObject); var tmp : TTeeGrid; begin tmp:=TTeeGrid.Create(Self); - tmp.Assign(TeeGrid1); - tmp.Free; + try + tmp.Assign(TeeGrid1); + finally + tmp.Free; + end; end; type