Search:
Login
Help/Guide
About Trac
Preferences
Register
Wiki
Timeline
Roadmap
Browse Source
View Tickets
Search
Context Navigation
Back to Ticket #294
Ticket #294
: leaktest.py
File leaktest.py,
269 bytes
(added by richard,
4 months
ago)
Simple test case which demonstrates the leak (if watched in top)
Line
1
import
gc
2
import
xapian
3
4
count = 0
5
terms = [
'foo'
,
'bar'
]
6
while
True:
7
query = xapian.Query(xapian.Query.OP_OR, terms[0], terms[1])
8
query = xapian.Query(xapian.Query.OP_OR, terms)
9
count += 1
10
if
count % 1000 == 0:
11
print
count
12
gc.collect()
Download in other formats:
Original Format