|
From: | Hans Aberg |
Subject: | Re: Leaks from bison 2.0/Flex 2.5 |
Date: | Mon, 3 Oct 2005 20:09:44 +0200 |
On 3 Oct 2005, at 19:47, Frans Englich wrote:
On Monday 03 October 2005 13:57, Hans Aberg wrote:On 3 Oct 2005, at 15:35, Hans Aberg wrote:This leak is due to the allocation of a C-string for error messages. The leak can be fixed by using std::string instead (which I did in the skeleton file I am using).
It might be important to fix this then, if the parser is invoked many times in a program running for an extended time.In my case, where the parser/scanner is in an application that namely run forlong times, such a fix would of course be appreciated.
You can either fix this by yourself by merely rewriting the skeleton file using a std::string instead, or persuading Akim Demaille doing it in the C++ parser rewrite he is working on now.
As for the first approach, you might check the way I did it in the Bison_Patches archive, in the thread "FYI: lalr1.cc: Remove the traits", 19 September 2005, where I posted my skeleton file.
Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |