Memory leak in ibm_db.fetch_assoc
I had a really frustrating time yesterday, trying to sort out some bugs in IBM's
ibm_db
DB2 driver for
Python. Unfortunately I don't know Python well enough to know whether the bugs are in the
ibm_db
driver, Python, or my misuse if either or both :( But what I can tell you, is that the following Python /
ibm_db
code results in a definite memory leak.
sql = "SELECT filename, data FROM files WHERE id = ... ";
stmt = ibm_db.exec_immediate(conn,sql);
row = ibm_db.fetch_assoc(stmt);
row.clear(); # Just to be sure.
ibm_db.free_result(stmt);