TDAFolderBriefcase possible memory leak

Hello,

If TDAFolderBriefcase is create with aOwnTables := false
and then is call AddTable with aCopyTable := true
internal TDADataTable wich is created is not freed.

This situation is like in Briefcase sample.
I use DataAbstract for Delphi, version 10.0.0.1469

Best regards,

Logged as bugs://D19108 for investigation

Hi,

I can reproduce memory leaks with the Briefcase sample, however the Briefcase (Console) sample has no such issues.

you can use this rule:

  • if briefcase exists:
lbr := TDAFolderBriefcase.Create(filename, True, True);
lbr.AddTable(table, True);
  • if briefcase doesn’t exist:
lbr := TDAFolderBriefcase.Create(filename, False, False);
lbr.AddTable(table, False);

bugs://D19108 was closed as fixed.

updated sample: Briefcase.zip (44.5 KB)

Hi,

I’ve updated uDABriefcase.pas too and now it will not generate any memory leaks with aOwnTables := false and aCopyTable := true.

1 Like