This helped !!! Thanks so much
Fabio
>You only have to reset the query object when trying to reuse it. A
>newly-created query object is alredy reset.
>
>> //executes the query
>> Result myResult = myQuery.store();
>> return myResult;
Warren Young <mysqlpp@stripped>
15/12/2004 01:35
To: MySQL++ Mailing List <plusplus@stripped>
cc:
Subject: Re: glibc detected double free or corruption
Fabio.DAndria@stripped wrote:
> Result CDatabase::ReturnQuery(string query)
It would be more efficient to pass the string as a const reference. As
it is, you are copying the string object when calling this function,
which isn't necessary.
> //executes a query and returns a resultset back
> Query myQuery = myConn.query();
> myQuery.reset();
You only have to reset the query object when trying to reuse it. A
newly-created query object is alredy reset.
> //executes the query
> Result myResult = myQuery.store();
> return myResult;
Again, an unnecessary copy here. Just say "return myQuery.store();"
> catch (BadQuery er)
Another unnecessary copy. You can almost always catch exceptions by
reference.
As for the rest of your code, please reduce it to a simpler example.
I'm not going to work my way through your threading code just to get to
the MySQL++ issue underneath, if any.
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=1