[TRE-general] Memory leak?

Ville Laurikari ville at laurikari.net
Fri Jan 12 08:35:09 EET 2007


On Thu, Jan 11, 2007 at 08:46:23PM +0100, Christian Wieninger wrote:
> It works and is called many thousand times. But it seems that there is
> any memory leak eating up all memory after some time. Is there anything
> wrong with my code?

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.

--
http://www.iki.fi/vl/


More information about the TRE-general mailing list