Original Post
Hey, anybody ever had problems with Flex (or Bison) leaking memory? I''m having major problems with them. I''m working on a sharewate solitaire game, with an interpreted scripting language for creating custom games. I''m using the newest versions of Flex and Bison for the lexer and parser. When I compile a script however, I get a LOT of leaked memory. There is no damage, and they are ''untraceable'' leaks - ie. Leaks created using other memory operations beside the debug version of new (malloc, alloca, etc.). VC doesn''t show the source (because the''re not created using new), and there''s no question that it''s not in my code. I had a problem like this before, where flex wasn''t freeing it''s global buffer. I fixed it by adding a call to yy_delete with the current buffer as a parameter at the end-of-file handler in the lexer code itself, however I am at a loss about these leaks. They generally contain tokens or pieces of tokens from the script code, and I have searched everywhere, but I can''t seem to find any answers.