fix some memory leaks for parsing & cleaning up rules
great for "delete transformations"
@zimmerle What is holding you back from merging this? I also have a problem with these memory leaks, it would be great to merge it. ;)
@poszu From my test in #2710, even patched this, there are many memory leak. Which g++ version do you use?
@poszu From my test in #2710, even patched this, there are many memory leak. Which g++ version do you use?
Yes, I am aware of other leaks too. I'm using clang 10. ASAN reports plenty of leaks on the v3.0.6.
I don't believe the portions of this PR related to filename are correct.
The problem is that location.hh is a generated file. The manual change to that file suggested in this PR could be made and a build done. But thereafter, any time bison rebuilt the generated files, those manual changes would be lost.
I'll go ahead and commit the other two fixes via a separate PR:
- Rule class was missing a virtual destructor
- delete of transformations vector
The parser-filename issue can be addressed later via a separate issue or PR.
The two issues have been merged via #2801 .
Thanks @Abce