[Xapian-devel] Re: [Xapian-commits] 8107:
richard at lemurconsulting.com
Thu Apr 5 12:20:57 BST 2007
> Log message (7 lines):
> backends/database.cc: Database::Internal can't call the
> PostingIterator(PostingIterator::Internal*) ctor (at least under
> g++ 3.3.5) because it isn't a friend (only class Database is).
For the record, Mark just reported this to me under windows so it was a
problem there too, but it does work under GCC 4.1. No idea which
compiler is "correct", but that hardly matters...
> Can't seem to forward define Database::Internal to make
> Database::Internal a friend so just use LeafPostList directly
> as that seems less bad than pulling in the whole of database.h
> or making PostingIterator::internal public.
Only problem with this patch is that it looks like it leaks the
LeafPostList if an exception is thrown by one of the other methods (such
as delete_document()). Actually, does the postlist get deleted at all?
I've changed this to wrap the postlist in a RefCntPtr which should fix
the leak issue.
More information about the Xapian-devel