From d757b579ac214bda52ec1f192e7feee7877d7bb6 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 12 Jun 2009 17:53:16 +0000 Subject: [PATCH] Fix minor memory leak for suspended cached dataset holding collations. --- source/main.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index e136914d..7ac1ede2 100644 --- a/source/main.pas +++ b/source/main.pas @@ -8829,8 +8829,10 @@ end; function TMainform.GetCollations(Items: TWideStrings = nil): TDataset; begin // Return cached collation list, used in several places, e.g. table editor - if (dsCollations = nil) or (dsCollations.State = dsInactive) then + if (dsCollations = nil) or (dsCollations.State = dsInactive) then begin + FreeAndNil(dsCollations); dsCollations := GetResults('SHOW COLLATION', True); + end; if Assigned(dsCollations) then begin dsCollations.First; if Assigned(Items) then begin