Page 1 of 1

Memoryleak with TVirtualDataSet and ftWideMemo

Posted: Wed 29 Mar 2017 07:47
by Jank
Hi,

i have in the dpr the following line:

Code: Select all

ReportMemoryLeaksOnShutdown := True;
and here is the rest of my source:

Code: Select all

procedure TForm3.FormShow(Sender: TObject);
var
  lDataSet : TVirtualDataSet;
begin
  lDataSet := TVirtualDataSet.Create(nil);

  try
    lDataSet.OnGetRecordCount := DataSetGetRecordCount;
    lDataSet.OnGetFieldValue  := DataSetGetFieldValue;
    lDataSet.FieldDefs.Add('test', ftWideMemo);
    lDataSet.Active := True;
    lDataSet.Last;
    lDataSet.First;
  finally
    FreeAndNil(lDataSet);
  end;

end;
If I close the application I recive a memory leak:
TCompressedBlobData x 6
Unknown x 3
TCompressedBlob x3

If i do the same with a ftString-Field, I have no Problem.

Thank you.

Regards, Jan

Re: Memoryleak with TVirtualDataSet and ftWideMemo

Posted: Fri 31 Mar 2017 13:54
by MaximG
Thank you for the information. We reproduced the problem and fixed this error. The fix will be included in VirtualDAC next build. In addition, this build will support RAD Studio Delphi 10.2 Tokyo . We are planning the release of this VirtualDAC version next week.