On Thu, Oct 08, 2020 at 01:17:25PM -0400, Tom Lane wrote: > Agreed. In theory there might be some point in removing leaks that happen > per-statement, so as to avoid unreasonable memory bloat when processing an > extremely long input file. In practice nobody has complained about that, > and if somebody did I'd probably question the sanity of putting so much > code into one file. (The C compiler would likely bloat even more while > processing the output...) Moreover, given the way the ecpg grammar works, > it'd be really painful to avoid all such leaks, and it might well > introduce bugs not fix them.
I got to wonder about that, and I don't quite see how to make all the memory handling clean without having at least a concept of per-statement memory context to make any cleanup easy once a statement is done. That's a lot of infrastructure for a case nobody really complained about, indeed.. > In any case, if this TODO item is going to lead to ideas as dubious > as "let's free progname before exiting", it's not helpful. +1. Agreed to just remove it. -- Michael
signature.asc
Description: PGP signature