[TRE-general] Memory leak?
Christian Wieninger
cwieninger at gmx.de
Fri Jan 12 09:30:15 EET 2007
Ville Laurikari schrieb:
> The compiled regexp object must be freed. For each successfull call
> to regncomp(), you'll need to call regfree() to free the pattern
> buffers allocated by regncomp(). Note that you must not call
> regfree() if regncomp() returned with an error code.
>
I tried regfree() too, but get a "memory corruption" when calling it.
After inspecting the agrep.c code I found that there's no call to
regfree, so I thought it was not necessary.
Actually I seems that all problems are related to calls of the regex
standard library. I also tried this:
namespace nsTRE
{
#include <tre/regex.h>
}
and put a "nsTRE::" before each reg function, but the problem still
keeps the same. :-(
Regards,
Christian
More information about the TRE-general
mailing list