[Xapian-tickets] [Xapian] #186: User subclassable classes should be reference counted

Xapian nobody at xapian.org
Tue Mar 22 23:49:55 GMT 2016


#186: User subclassable classes should be reference counted
-------------------------+-------------------------------
 Reporter:  richard      |             Owner:  olly
     Type:  defect       |            Status:  assigned
 Priority:  normal       |         Milestone:  1.3.5
Component:  Library API  |           Version:  git master
 Severity:  normal       |        Resolution:
 Keywords:               |        Blocked By:
 Blocking:               |  Operating System:  All
-------------------------+-------------------------------

Comment (by olly):

 OK, so the reason why `LatLongMetric` has `clone()` is so that
 `LatLongPostingSource::clone()` can in turn clone the metric.  Optionally
 reference counting the metric would provide the same ability with less
 object copying and better consistency, though this only happens once per
 sub database per query run, so really isn't a hot spot.

 If we change that, it would make sense to change to passing a pointer
 instead of a reference.  The bindings would also need an updating to keep
 a reference to the currently set metric.

 Overall, I'm inclined to leave this as-is for 1.4.0.  I think we may want
 to review the geospatial API at some future date anyway (and I've opened
 #712 for that), but more real world use would be useful to inform that.

 So that leaves just `PostingSource` to consider...

--
Ticket URL: <https://trac.xapian.org/ticket/186#comment:40>
Xapian <//xapian.org/>
Xapian



More information about the Xapian-tickets mailing list