TDataAbstractService.ClearExchangeStruct - memory leak of managed record members

Hello,

I have detected a memory leak occuring on each data request (when more than one table’s data are requested at once) in the TDataAbstactService.InternalGetData(). I believe the TDataAbstractService.ClearExchangeStruct is missing a Finalize() call as any subsequent InitExchangeStruct call clears all managed references (dynamic arrays and strings) without their proper cleanup.

See code in DataAbstractService_Impl.pas:

procedure TDataAbstractService.ClearExchangeStruct(aRec: PDAServiceExchangeData);
begin
  aRec^.lOrderBy.Free;
// <FIX>>>
  Finalize(aRec^); // aRec needs to be finalized to avoid memory leak
// <<<FIX>
end;

Regards, Jaroslav

Logged as bugs://D19398.

bugs://D19398 was closed as fixed.

Hello,

along with this, we reported two other unpleasant problems:

https://talk.remobjects.com/t/uroclasses-unregisterenummappings-kills-all-enum-mappings-in-a-namespace-when-any-type-is-unregistered-e-g-a-plugin-unload/29117/3

https://talk.remobjects.com/t/memory-leak-in-thyrodlreader-mergerodls/29121/3

I have noted that these problems are not yet fixed in release 1573, although they are fairly simple fixes. I would like to know in what release the fixes will be published.

Thanks, regards from Prague

Jaroslav

Hi,

these issues were fixed after .1573 was created.

they will be included into next release (.1575)

Hello and thank you for your reply.

Is there any date when we can expect the release of .1575? We are approaching the regular update date for our product and I would need to know if I can count on patches as part of the official release, or if we will keep our own patches in this build.

Thanks, regards from Prague.

Jaroslav

Hi,

.1575 will be announced this week.

1 Like