memory leak in KJS
David Faure
faure at kde.org
Sat Jan 29 10:28:51 GMT 2005
On Saturday 29 January 2005 11:00, André Wöbbeking wrote:
> On Saturday 29 January 2005 05:39, George Staikos wrote:
> > On Friday 28 January 2005 21:19, Harri Porten wrote:
> > >
> > > There's one known leak in the parser that occurs when the parser
> > > hits a syntax error. In that case the bison generated will unwind
> > > and leave the memory allocated for string tokens without an owner.
> > > Last time I tried to solve it I realized how difficult it is to do
> > > with bison. Having a pool of strings allocated during parsing (that
> > > could be freed in the end if they are unused might be a
> > > possibility).
> >
> > I had this problem in Kst also. I solved it by adding a ridiculous
> > number of error paths into the syntax and cleaning up recursively in
>
> Exception handling would be nice in this case but I know that this is
> still unwanted in KDE :-(
If it really helps here I don't see why you shouldn't use exceptions.
KHTML uses them internally as required by the DOM, and the price
of exceptions isn't what it was with earlier gcc versions anymore AFAIK.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list