List:MySQL++« Previous MessageNext Message »
From:Rieu Nicolas Date:July 12 2006 5:35pm
Subject:RE: Problem of memory with Row ???
View as plain text  
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:nicolas.rieu@stripped] 
Envoyé : mercredi 12 juillet 2006 19:23
À : plusplus@stripped
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.



This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use
this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.


This message contains information that may be privileged or confidential and is the
property of the Capgemini Group. It is intended only for the person to whom it is
addressed. If you are not the intended recipient,  you are not authorized to read, print,
retain, copy, disseminate,  distribute, or use this message or any part thereof. If you
receive this  message in error, please notify the sender immediately and delete all 
copies of this message.

Thread
Problem of memory with Row ???Rieu Nicolas12 Jul
  • RE: Problem of memory with Row ???Rieu Nicolas12 Jul
  • Re: Problem of memory with Row ???Warren Young18 Jul
    • RE: Problem of memory with Row ???Rieu Nicolas20 Jul
      • Re: Problem of memory with Row ???Warren Young21 Jul
      • SOLVED: Problem of memory with Row ???Rieu Nicolas14 Sep