[Xapian-tickets] [Xapian] #186: User subclassable classes should be reference counted
Xapian
nobody at xapian.org
Tue Mar 22 08:31:09 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):
`LatLongMetric` objects are currently cloned by the objects they are set
on, so don't need reference counting as things stand.
I'm not entirely sure this cloning is a good idea - `Weight` objects
support `clone()`, but they have to be cloned for each weighted subquery;
`PostingSource` objects support `clone()`, but they need to be cloned for
each subdatabase. It seems `LatLongMetric` only supports `clone()` as a
way to avoid holding a pointer/reference to an external `LatLongMetric`
object, and making it optionally reference counted is more consistent and
probably makes it a little simpler to implement your own metric.
--
Ticket URL: <https://trac.xapian.org/ticket/186#comment:39>
Xapian <//xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list