When i execute the attached test case the interpreter grows to ~500 MB and stays there. shouldn't the memory been freed? pyodbc+mysql frees the memory imidiatly. This applies also to version 1.2.3.*
it is not mysql-python's memory leak. It is python's memory leak! in python, it will cache the int,string(see python's source). so in your testcase, python would cache all strings(although in this testcase,all strings are same,but python don't know this). but I don't know why pyodbc free the memory. please upload the pyodbc testcase!
sorry, there are some error! In this test case python not cache string, but because of the python memory pool, it keep the memory.
In python, python has itself memory pool. when small object (<= 256) , python will use memory pool, big object direct use malloc. so when use small object, python will 'cache' it; use big object , glibc will 'cache' it.