Closed mpinjr closed 2 years ago
i'm a bit surprised with all the time spent tracking memory leaks in awk. it was never intended for building long-running programs, and if someone was really interested in doing something as strange as that, there is a good chance they would be working with gnu awk. but i'll review the changes you propose.
@plan9 Changes look reasonable. These days people do all kinds of things with awk, and being memory clean is a good idea in general anyway. Note that the *BSD people avoid gawk due to its license, so they end up expecting more out of The One True Awk.
The new string value is always freeable (strdup'd by tostring), so never mark it as DONTFREE.
Every built-in mentioned in setfree is affected.
make check
completed uneventfully.Thank you for taking the time to consider this contribution, Miguel