Memory Leak, Linux, Aurelius, Delphi 10.3.3

Hello Everybody!

A hint for getting right directly would be highly appreciated. Just noticed in log that one of my Linux micro-services leaking, huge number of objects TList<Aurelius.Metadata.TEntityProperty>.TEnumerator.. I found in Aurelius code declaration like this:

unit Aurelius.Mapping.Metadata;
.........
{$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF} FProp: TEntityProperty;

Maybe this be a reason?

Thank you!

I'm sorry, I didn't understand your question. I guess you are having a memory leak, in this case, please provide full steps to reproduce the problem, and the memory leak report you are getting. Thank you.

Thank you for response. The problem I see is number of object goes up TList<Aurelius.Mapping.Metadata.TEntityProperty>.TEnumerator


when application under Linux. Windows version does not have such objects at all in a logger. My current guess, code like below use enumeration, and .... I guess Embarcadero must to do work better.

So, yes, I see the leak, Aurelius part of application is super simple, just saving entities, leak is visible, counter always goes up. If TEnumerator is automatically created object, then this is no TMS fault at all.

Let me know if you have other opinion. Appreciate your time and thanks for answer.

Alexey.

function TEntityType.FindPropsFromMember(
const Member: TRttiMember): TArray;
var
Prop: TEntityProperty;
I: Integer;
begin
SetLength(Result, Properties.Count);
I := 0;
for Prop in Properties do
if SameText(Member.Name, Prop.RttiInfo.MemberRef.Name) then
begin
Result[I] := Prop;
Inc(I);
end;
SetLength(Result, I);
end;

Unfortunately, that seems to be a known Delphi 10.3.3 bug. The solution would be to upgrade to a newer Delphi version: https://quality.embarcadero.com/browse/RSP-26257.

Thank you Wagner, appreciate your help!
The irony, after this problem of Embarcadero got already known D11 November + Sparkle.Now trying to find combination of Delphi which will allow me to work.

Thank you for help, TMS is great :)

1 Like