6 messages in com.mysql.lists.plusplusRE: Problem of memory with Row ???
FromSent OnAttachments
Rieu Nicolas12 Jul 2006 10:22 
Rieu Nicolas12 Jul 2006 10:35 
Warren Young18 Jul 2006 07:18 
Rieu Nicolas20 Jul 2006 10:05 
Warren Young21 Jul 2006 04:56 
Rieu Nicolas13 Sep 2006 23:35 
Subject:RE: Problem of memory with Row ???
From:Rieu Nicolas (nico@capgemini.com)
Date:07/12/2006 10:35:14 AM
List:com.mysql.lists.plusplus

When I use valgrind, the result tells me that:

==12093== Invalid free() / delete / delete[] ==12093== at 0x1B9098CF: operator delete(void*) (vg_replace_malloc.c:155) ==12093== at 0x1C0A0E58: mysqlpp::Row::~Row() (new_allocator.h:86) ....

Any suggestion ?

-----Message d'origine----- De : Rieu Nicolas [mailto:nico@capgemini.com] Envoyé : mercredi 12 juillet 2006 19:23 À : plus@lists.mysql.com Objet : Problem of memory with Row ???

Hello all.

The following program (very simple) crashes at the first time it achieves the end (}) of the block < for >

------------------------------------------------------

Connection conn ("database","host","user","password");

Query query = conn.query();

query << "SELECT * FROM table ";

Result res = query.store();

if (res.size() > 0) {

cout<<"res.size(): "<<res.size()<<endl;

for (int cpt = 0; cpt < res.size(); cpt++) {

cout<<"cpt : "<<cpt<<endl;

Row row = res.at(cpt);

}

}

----------------------------------

Result of execution :

Res.size() : 6

cpt: 0

----- it crashes and doesn't display cpt: 1, cpt: 2 .. ------

It seems to be a problem of freezing memory with < row > ???

Can you help me please ???

Did it happen to anyone else ?

Nicolas Rieu.