[Xapian-tickets] [Xapian] #647: memory leak patch

Xapian nobody at xapian.org
Wed Aug 13 05:11:27 BST 2014

#647: memory leak patch
 Reporter:  dk               |             Owner:  olly
     Type:  defect           |            Status:  new
 Priority:  normal           |         Milestone:  1.2.19
Component:  Xapian-bindings  |           Version:  1.2.15
 Severity:  normal           |        Resolution:
 Keywords:                   |        Blocked By:
 Blocking:                   |  Operating System:  All

Comment (by olly):

 OK, I've come up with a testcase using Devel::Leak.

 I had to swap the order of the push and the call to the real method, or
 else the tests fail because set_stopper no longer returns undef.

 Also, the object's value is simply a blessed reference to a scalar holding
 the address of the C++ object, so I've tweaked it to just use {{{$$self}}}
 as the hash key rather than the string representation of the object (which
 includes its address, so it works, but the hash key is larger than

 Committed to 1.2 branch in r18200.

 Keeping this open for now, as we should fix the other places where we
 currently leak objects like this in a similar way.

Ticket URL: <http://trac.xapian.org/ticket/647#comment:4>
Xapian <http://xapian.org/>

More information about the Xapian-tickets mailing list