8 messages in com.mysql.lists.plusplusRe: bug in Store() in mysql++ for Bor...| From | Sent On | Attachments |
|---|---|---|
| Michael Masson | 26 Jun 2004 14:49 | |
| Michael Masson | 26 Jun 2004 14:53 | |
| bayufa | 29 Jun 2004 02:01 | |
| Mark Scholtens | 29 Jun 2004 03:11 | |
| sinisa | 29 Jun 2004 05:34 | |
| sinisa | 29 Jun 2004 05:45 | |
| bayufa | 29 Jun 2004 19:54 | |
| sinisa | 30 Jun 2004 05:18 |
| Subject: | Re: bug in Store() in mysql++ for Borland![]() |
|---|---|
| From: | Mark Scholtens (ma...@iisg.nl) |
| Date: | 06/29/2004 03:11:27 AM |
| List: | com.mysql.lists.plusplus |
As far as I know not disposing memory allocated may crash an unwary program
when no more memory is available. However, data corruption indicates another
issue. Then I don't know what it can cause your trouble. But here's one guess:
is the
mysql_lib used thread-safe ?
sincerely, Mark Scholtens
On 29 Jun 2004 at 16:01, bayufa wrote:
Hi All
I think i found a bug or something ! I found memory leak warning ( using CodeGuard for Borland Builder 6 ) after i terminate application . I'm doing this because i found some 'memory corruption' indication in my application . So it can crash randomly .
My code is pretty simple ..
in a thread
while (1) { Result res; Row row;
sql = "SELECT .... "; Query query = con.query();
query << sql.c_str(); query.store();
..... do the rest }
I found some memory leak point to function store() . I read the source code and found that there is actually memory allocation ( for char ) in the function. Im not sure , but i think someone forgot to delete it .
But if i change the code to something like this
sql = "SELECT ... " Query query = con.query(); query.store(sql.c_str());
...
It also work , and does not produce Memory Leak warning . Im just a beginner . So i just inform you guys about the situation ..! Perhaps someone can explain better ..
thanks BayuFA
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=ma...@iisg.nl




