Open justinmeiners opened 5 years ago
Currently, C and C++ parsers leak the entire syntax tree whenever a syntax error is encountered.
Bison provides a mechanism for handling destruction when syntax fails to parse Destructors. However, it is not trivial to implement.
C++ parser also leaks memory on successful parse. If I understand correctly, some buffer isn't freed after parsing in C++ parser.
C parser leaks memory only on failed parse.
Currently, C and C++ parsers leak the entire syntax tree whenever a syntax error is encountered.
Bison provides a mechanism for handling destruction when syntax fails to parse Destructors. However, it is not trivial to implement.