List:MySQL++« Previous MessageNext Message »
From:weidong shen Date:December 16 2008 10:01am
Subject:Re: memory will increase all the time in a simple example
View as plain text  
The version I used:
mysql++:   3.0.6
mysql:       5.0.67
OS:           windows2003 and windowsXP
IDE:          visual studio2005

2008/12/16 Mickaël Wolff <mickael.wolff@stripped>

> weidong shen a écrit :
>
>> Thanks for your response:)
>>
>  :)
>
>> I changed the code as below. The result is as same as before.  The memory
>> will be consumpted 4k per 1~2 second.
>>       mysqlpp::sql_int id = 0;
>>        while (1) {
>>            Query query = con.query();
>>            query  << "SELECT  COUNT(*) FROM dp_npc;";
>>            StoreQueryResult res = query.store();
>>            mysqlpp::Row &obRow = res[0];
>>            cout << obRow[0];                         // the memory is
>> statble.
>>            id = obRow[0];   // the memory will be increasing all the time
>> when to execute this instruction.
>>              for (int i = 1; query.more_results(); ++i) {
>>                res = query.store_next();
>>            }
>>            Sleep(10);
>>        }
>>
>  What is Sleep ?
>  What OS are you running ?
>  What compiler ?
>  What version of MySQL++ ?
>
>  I tried something near your code with 3.0 version on my Debian, and the
> memory consumption never grows (even I did an infite loop without pause).
>
>
> --
> Mickaël Wolff aka Lupus Michaelis
> http://lupusmic.org
>
>

Thread
memory will increase all the time in a simple exampleweidong shen16 Dec
  • Re: memory will increase all the time in a simple exampleweidong shen16 Dec
  • Re: memory will increase all the time in a simple exampleMickaël Wolff16 Dec
    • Re: memory will increase all the time in a simple exampleweidong shen16 Dec
      • Re: memory will increase all the time in a simple exampleMickaël Wolff16 Dec
        • Re: memory will increase all the time in a simple exampleweidong shen16 Dec
  • Re: memory will increase all the time in a simple exampleWarren Young16 Dec