Need some help with memory leaks

I have this structure:
REZEPT -> ZUTAT -> LEBENSMITTEL

This function retrieves an entity of type TTBLLEBENSMITTEL:

function TmodelRezeptSchnittstelleMain.GetLM(mgrManager: TObjectManager; sHerkunftCD, sLebensmittelCD: string)
  : TTBLLEBENSMITTEL;
var
  Criteria:    TCriteria<TTBLLEBENSMITTEL>;
  ExpressionA: TLinqExpression;
  ExpressionB: TLinqExpression;
begin
  Criteria := mgrManager.Find<TTBLLEBENSMITTEL>;
  ExpressionA := Linq.eq('HerkunftCD', sHerkunftCD);
  ExpressionB := Linq.eq('LebensmittelCD', sLebensmittelCD);
  Criteria.Add(ExpressionA and ExpressionB);
  Result := Criteria.List.First;
end;



I need this entity to set the master-detail relationship for the Entity ZUTAT  (via field Herkunft-->Lebensmittel). Zutat ist part of TTBLREZEPT:

                     Zutat := TTblrezeptzutat.Create;
                      Lebensmittel:=Model.GetLM(mgrManager, Rec.HerkunftCD.Value, Rec.LebensmittelCD.Value);
                      Zutat.HERKUNFTCD := Lebensmittel;
                      Zutat.Rezeptid := Rezept;
                      mgrManager.Save(Zutat);
                      Rezept.TBLREZEPTZUTATList.Add(Zutat);   



However, I get memory leaks for Entity TBLLEBENSMITTEL and do not know why. Any idea?

Tx in advance!

What exactly are the objects being leaked? From the code you provided, I see a leak for a TList<TTBLLEBENSMITTEL>, not TTTBLLEBENMITTEL:



  Result := Criteria.List.First;


Criteria.List returns a list that you must destroy. If you are sure the query will always return 0 or 1 object, you can use UniqueResult instead:


Result := Criteria.UniqueResult;