Hi Olly, 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. (Btw., I don't test before deleting, but maybe "delete 0;" does not work on all platforms?) -- Robert Pollak GPG Key ID: 748646AD -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: queryparser-leak.patch URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20040615/3d324883/attachment.ksh>
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
Reasonably Related Threads
- Multithread problem: Writing to a db disables reading from another one
- large Xapian index files
- Searching without flush?
- [issue] The difference between QueryParser::FLAG_AUTO_SYNONYMS and QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS
- How to make QueryParser select entire word like "H.O.T"