Re: memory leak?
Jean-Claude Wippler <[email protected]> Sun, 22 Jan 2006 21:11:33 +0100
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > This Python script eventually consumes all available memory and > dies. Is this > a bug? [...] > import metakit, os > > store = metakit.storage("leakcheck", 1) > db = store.getas("test_db[k:B]") > > while True: > k = os.urandom(20) > db.append(k=k) > db.delete(db.find(k=k)) No. It's because all changes are buffered in memory until commit. To avoid it, insert "db.commit()", say every 100,000 iterations. -jcw _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit