TCustomAdvPanel - Memory Management with trgn

There are some issues with delete and create region at TCustomAdvPanel.DrawCaptionBkg:
...
csRounded:
begin
Canvas.Pen.Color := BorderColor2; //Round Rects for 3D effect
tRgn := CreateRoundRectRgn(R.Left,R.Top+(r.Bottom-r.Top)div 2,R.Right,R.Bottom,32,32);
SelectClipRgn(Canvas.Handle,tRgn);
Canvas.RoundRect(R.Left,R.Top,R.Right,R.Bottom,32,32);
Canvas.Pen.Color := BorderColor1;
DeleteObject(tRgn); //deleteObject is missing
tRgn := CreateRoundRectRgn(R.Left,R.Top,R.Right,R.Bottom-(r.Bottom-r.Top)div 2,32,32);
...
csSemiRounded:
begin
Canvas.Pen.Color := BorderColor2; //Round Rects for 3D effect
...
DeleteObject(tRgn);
R.Top := R.Top + 1;
R.Left := R.Left + 1;
tRgn := CreateRectRgn(0, 0, 1, 1); //CreateRectRgn is missing for using at CombineRgn!!
rgn1 := CreateRoundRectRgn(R.Left,R.Top,R.Right,R.Bottom,32,32);
rgn2 := CreateRectRgn(R.Left,R.Top,R.Right-(r.Right-r.Left)div 2,R.Bottom-1);
CombineRgn(tRgn,rgn1,rgn2,RGN_OR);//round rectangle + rectangle
end;

Thanks for reporting.
We confirm it will be fixed for the next update.