[Xapian-tickets] [Xapian] #714: Use C++ API optional reference counting in bindings

Xapian nobody at xapian.org
Thu Oct 6 22:20:23 BST 2022


#714: Use C++ API optional reference counting in bindings
-----------------------------+-------------------------------
 Reporter:  Olly Betts       |             Owner:  Olly Betts
     Type:  defect           |            Status:  new
 Priority:  normal           |         Milestone:  1.4.x
Component:  Xapian-bindings  |           Version:  git master
 Severity:  normal           |        Resolution:
 Keywords:                   |        Blocked By:
 Blocking:                   |  Operating System:  All
-----------------------------+-------------------------------
Comment (by Olly Betts):

 The problem seems to be that after `release()` Xapian will delete the
 object once it no longer has any references to it, and then if the Python
 object still exists it points to a deleted C++ object.  The Python3
 `pythontest.py` testcase "matchspy" exercises this case.

 I think we can use the `ref()` and `unref()` methods instead (which is
 more like Richard's earlier attempts in #186 in fact).
-- 
Ticket URL: <https://trac.xapian.org/ticket/714#comment:4>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list