help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Leaks


From: Hans Aberg
Subject: Re: Memory Leaks
Date: Wed, 22 Nov 2006 20:01:48 +0100

On 22 Nov 2006, at 19:31, Paulo J. Matos wrote:

> Which means that since I'm using a C generated parser I should use
> destructor. But destructor will be called after each successful action > or after each failed parsing (to which an action never gets called but
> the given value is actually allocated)?

Only when the parser unwinds the stack in a parse error recovery
attempt, or so I remember (it's easy to check the written C-parser).
You still to do normal cleanup in the rule actions.


Ah, ok... so, not using it means mem leak since user has no way to avoid it! :-)
Well, I'll have recheck my parsers...

Especially when you have a program that is not terminated quickly, or used as a library (such as a DLL).

Thank you!

You are welcome.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]