THAT was the answer I was looking for. I thought it was something
relating to SQL and all. As soon as I went through and fixed the
commands, the leaks quit, well leaking. Thanks for pointing that one out
to me.
+----------------------------------------------------+
+   TJW: Head Tech, designer: Dreamless Realms Mud   +
+   Mud : http://drealms.kyndig.com                          +
+   Telnet: drealms.kyndig.com port 9275                     +
+   OLC Docs: http://olc.kyndig.com                        +
+----------------------------------------------------+


-----Original Message-----
From: Kermit [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 10, 2002 5:37 AM
To: [EMAIL PROTECTED]; [email protected]
Subject: RE: MySQL/Memory blahs

Tom,

Interesting setup you have with send_query() don't think I have ever
seen it done that way in C. I might have been misreading this but from
my first glance at your code noticed that you free 'db' but you never
get around to freeing db->result, when you call mysql_store_restore() it
allocates memory for the MYSQL_RES structure. Take a look at
http://www.mysql.con/doc/n/o/node_714.html. You're going to have to call
mysql_free_result() to free up that memory.

kermit

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom
Whiting
Sent: Monday, June 10, 2002 3:05 AM
To: [email protected]
Subject: MySQL/Memory blahs

struct database *send_query(char *command)
{
....
       if (!(db->result=mysql_store_result(&my_connection)))
       {
        error_db(command, 2 );
        }
....
       return(db);
}







Reply via email to