Memory leak in SetColors

hi


in ADVGrid i get a memory leak with the cell colors.

my procedure is

procedure TSpiegelDlg.ColorNormalCell(ACol, ARow, AColor: LongInt);
begin
   if (pos(ZimmerGrid.Cells[acol,1],ZimmerGrid.FColorCalender.WeekendDay) > 0) then
     ZimmerGrid.Colors[ACol,ARow] := ZimmerGrid.FColorCalender.Weekend else
     ZimmerGrid.Colors[ACol,ARow] := AColor;
end;

and i get the memory leaks in 
procedure TAdvStringGrid.SetColors(i,j: Integer;AColor: TColor);
begin
  CellProperties[i,j].BrushColor := AColor;
  if FUpdateCount = 0 then
    RepaintCell(DisplColIndex(i),j);
end;
--> 
function TBaseGrid.GetCellProperties(c, r: integer): TCellProperties;
var
  cp: TCellProperties;
begin
  if not Assigned(inherited Objects[c,r]) then
  begin
    cp := CreateCellProperties(c,r);
    Result := cp;
  end
  else
    Result := TCellProperties(inherited Objects[c,r]);
end;
-->
function TBaseGrid.CreateCellProperties(Col,Row: integer): TCellProperties;
var
  HA: TAlignment;
  VA: TVAlignment;
  WW: Boolean;
  GD: TCellGradientDirection;
  AColorTo, AMirrorColor, AMirrorColorTo: TColor;
  cp: TCellProperties;
begin
  cp := TCellProperties.Create(Self,Col,Row);
  cp.Alignment := GetDefaultAlignment;


can you please help me!

There must be more you are doing than just this.

In setting colors itself, there is no memory leak.

Test code:

procedure TForm1.FormCreate(Sender: TObject);
begin
  ReportMemoryLeaksOnShutdown := true;
  AdvStringGrid1.Colors[1,1] := clRed;
  AdvStringGrid1.Colors[2,2] := clYellow;
  AdvStringGrid1.Colors[3,3] := clGreen;
end;

Can you please provide more details how you use the grid to cause this? Are you setting cell colors our of the ColCount/RowCount boundaries?