AInter := TInterpreter.Create(ATree);
AInter.Interpret;
Output := AInter.PLive;
//AInter.FreeInstances;
AInter.Free;
AParser.Free;
ALexer.Free;
AResponse.Content := Output;
WriteLn(#13+'['+FormatDateTime('yyyy-mm-dd hh:nn:ss.zzz', Now)+'] ' +
ARequest.Method + ': '+
ARequest.URI+' -- '+ IntToStr(AResponse.Code)+
' ' + AResponse.CodeText +
', ' + IntToStr(AResponse.ContentLength) + ' B', #13);
The main section, who creates and free the elements of response is this. I thought that after the response it would clear itself. By the way, I really got to review my interpreter code.
I don't see ATree being Free-d, and if it eventually is, no guarantee it will free its children recursively as well. I'd say compile with -glh and you will get a proper stacktrace. AResponse, if it comes as HTTPRouter route's parameter, will be handled outside your registered handler, so no need to free it manually (in fact, don't).
In time: @leledumbo, I visited your GitHub and saw the template engineering and parsers seem to be a subject of your interest. Would you like to contribute at UltraGen project? I'm developing a brand new programming language specifically designed to create web pages. It can use plain and script text mixed like PHP but with modern approaches and strongly typed. Maybe you can find it interesting. Here is the link
https://github.com/alantelles/ultragen/tree/refactor
Greetings
I consider that one kind of shitty, as it was made with classic single person programming in mind. Nowadays we made frontend totally separate from backend, which is glued by HTTP contract.
I'm sorry I don't have time for such a project. Outside my main job, I only make things that I consider useful for me and only then I share it with the world.