From 395c8fbe96e2d5e12cc93b1a0f906ccd65e3ee6f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 3 Oct 2011 20:32:46 +0200 Subject: [PATCH] * Fixed TfrmHueSettings not freeing the preset doc --- Client/CentrED.lpi | 21 ++++++++++----------- Client/Tools/UfrmHueSettings.lfm | 1 + Client/Tools/UfrmHueSettings.pas | 6 ++++++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Client/CentrED.lpi b/Client/CentrED.lpi index 012bb7d..6b6455a 100644 --- a/Client/CentrED.lpi +++ b/Client/CentrED.lpi @@ -17,9 +17,9 @@ - - - + + + @@ -50,6 +50,7 @@ + @@ -98,6 +99,7 @@ + @@ -134,7 +136,7 @@ - + @@ -148,11 +150,11 @@ - + - + @@ -454,12 +456,9 @@ + + - - - - - diff --git a/Client/Tools/UfrmHueSettings.lfm b/Client/Tools/UfrmHueSettings.lfm index 659851f..edeaa49 100644 --- a/Client/Tools/UfrmHueSettings.lfm +++ b/Client/Tools/UfrmHueSettings.lfm @@ -9,6 +9,7 @@ inherited frmHueSettings: TfrmHueSettings ClientWidth = 225 Constraints.MinWidth = 225 OnCreate = FormCreate + OnDestroy = FormDestroy object lblHue: TLabel[0] AnchorSideLeft.Control = Owner AnchorSideTop.Control = edHue diff --git a/Client/Tools/UfrmHueSettings.pas b/Client/Tools/UfrmHueSettings.pas index e07ebb0..2d13567 100644 --- a/Client/Tools/UfrmHueSettings.pas +++ b/Client/Tools/UfrmHueSettings.pas @@ -60,6 +60,7 @@ type procedure cbRandomPresetChange(Sender: TObject); procedure edHueEditingDone(Sender: TObject); procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect; State: TOwnerDrawState); procedure lbHueSelectionChange(Sender: TObject; User: boolean); @@ -229,6 +230,11 @@ begin LoadRandomPresets; end; +procedure TfrmHueSettings.FormDestroy(Sender: TObject); +begin + FreeAndNil(FRandomHuePresetsDoc); +end; + procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect; State: TOwnerDrawState); var