Remove **PPrmRec** and use: ... `TPrmRecList = TList<TPrmRec>;` ... ``` PrmItem := PrmXPath[PrmXPath.Count - 1]; PrmItem.TagName := AnsiReplaceStr(PrmItem.TagName, '@', ''); ``` Remove `New(Prm);` This will fix a memory leak.