Upon working further with my code, there seems to be a memory leak.

I traced it to $mysql_command and to a smaller degree... $mysql_query

I'm not sure if I'm just not using it right, but mIRC's memory usage swells to 700 megs in a day.

To test it, I wrote an alias that called portions of the code inside large loops. Everything else I tested, including other mysql and com object aliases worked fine.