Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
Roadmap
View Tickets
Search
Context Navigation
Back to Ticket #294
Ticket #294
: leaktest.py
File leaktest.py,
269 bytes
(added by
Richard Boulton
,
16 years 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