I believe that I am having some problem with the API of C.
That you find the following test:
I implement a program in C that the only thing that makes is to call a
routine that obtains data of a chart every so often MySQL (ej: 10 seconds),
continuing the it lines of the function that happens to you previously.
The connection will liberate it when the program concludes.
I will make that the program calls to the routine during a followed day, at
the same time I examine the use by heart.
Supposing that the routine in C that obtains the data of MySQL this well
implemented one, the memory should be liberated after having completed each
call. Correct?
The function that I will use serious the following one:
int DB_Existe_Id_Cliente (element *agente)
MYSQL_RES *result;
int retorno;
MYSQL_ROW row;
sprintf(query, SELECT yams FROM clients WHERE
id=%d",agent->info.header.id_cliente);
if ((retorno=mysql_query(connection,query)) != 0)
return -1;
result=mysql_store_result(connection);
if (mysql_num_rows(result) == 0)
mysql_free_result(result);
return FALSE;
}
IF ((row=MYSQL_FETCH_ROW(result)) == NULL)
return -3;
strcpy(agente->info.header.nombre_cliente,row[0]);
mysql_free_result(result);
return TRUE;
}
Thanks.
Diego.-
-----Mensaje original-----
De: Sinisa Milivojevic [mailto:sinisa@stripped]
Enviado el: Viernes 17 de Noviembre de 2000 2:42 PM
Para: dzabalet@stripped
Cc: mysql@stripped
Asunto: RE: Memory problem.
hi!
Are you trying to proclain memory leak in a server, or in C API ??
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
--
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php" before
posting. To request this thread, e-mail mysql-thread56658@stripped
To unsubscribe, send a message to:
<mysql-unsubscribe-dzabalet=adinet.com.uy@stripped>
If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
http://lists.mysql.com/php/unsubscribe.php