[Xapian-devel] Re: QueryParser memory leak?
Olly Betts
olly at survex.com
Tue Jun 15 14:50:53 BST 2004
On Tue, Jun 15, 2004 at 03:39:54PM +0200, Robert Pollak wrote:
> valgrind showed me what seems to be a memory leak:
> QueryParser owns the Stopper and Stem instances it points to (since it
> deletes them e.g. in set_stemming_options), but it does not delete them
> at destruction.
Good catch - thanks. I'll apply it right away.
> (Btw., I don't test before deleting, but maybe "delete 0;" does not work
> on all platforms?)
Stroustrup says "Applying delete to zero has no effect" (end of section
6.2.6, 3rd ed. of "The C++ Programming Language").
Cheers,
Olly
More information about the Xapian-devel
mailing list