<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code on Tahir Hashmi</title><link>https://tahirhashmi.com/tags/code/</link><description>Recent content in Code on Tahir Hashmi</description><generator>Hugo</generator><language>en-GB</language><managingEditor>mail@tahirhashmi.com (Tahir Hashmi)</managingEditor><webMaster>mail@tahirhashmi.com (Tahir Hashmi)</webMaster><lastBuildDate>Mon, 29 Dec 2025 11:13:16 +0700</lastBuildDate><atom:link href="https://tahirhashmi.com/tags/code/index.xml" rel="self" type="application/rss+xml"/><item><title>MySQLdb Leaks Memory</title><link>https://tahirhashmi.com/posts/2010/06/30/mysqldb-leaks-memory/</link><pubDate>Wed, 30 Jun 2010 11:32:30 +0000</pubDate><author>mail@tahirhashmi.com (Tahir Hashmi)</author><guid>https://tahirhashmi.com/posts/2010/06/30/mysqldb-leaks-memory/</guid><description>&lt;p&gt;Whenever people search for a Python library for MySQL, they get directed to &lt;a href="http://sourceforge.net/projects/mysql-python/"

 target="_blank" rel="noopener"
&gt;MySQL for Python&lt;/a&gt;. However, there are some nasties hidden in it. Searching for “mysql python memory leaks” results in a few links which suggest that using Unicode causes memory leaks with the library.&lt;/p&gt;
&lt;p&gt;Today, however, I found another cause for MySQLdb memory leaks, while debugging a leaky Python daemon at work — database errors.&lt;/p&gt;
&lt;p&gt;Use this script:&lt;/p&gt;</description></item></channel></rss>