17 messages in com.mysql.lists.plusplusRe: using the 'use' query.
FromSent OnAttachments
Ian Miller28 Dec 2006 20:27 
Warren Young29 Dec 2006 13:38 
gary clark29 Dec 2006 14:58 
gary clark29 Dec 2006 16:18 
Ian Miller30 Dec 2006 05:27 
gary clark31 Dec 2006 07:06 
gary clark02 Jan 2007 13:57 
Matt Dargavel02 Jan 2007 17:23 
gary clark02 Jan 2007 21:17 
gary clark02 Jan 2007 21:22 
gary clark03 Jan 2007 07:34 
Warren Young03 Jan 2007 08:39 
gary clark03 Jan 2007 08:56 
Warren Young04 Jan 2007 15:56 
gary clark05 Jan 2007 08:58 
gary clark05 Jan 2007 15:37 
Warren Young05 Jan 2007 16:05 
Subject:Re: using the 'use' query.
From:gary clark (burs@yahoo.com)
Date:01/03/2007 07:34:03 AM
List:com.mysql.lists.plusplus

Hello,

I tried the following:

Query(Connection *c ,bool te = true): std::ostream(std::_Noinit), OptionalExceptions(te), Locakable(false), def(this), conn_(c), success_(false) { printf("Enter Query(connection * c,bool te=true\n"); init(&sbuffer); success_ = true; }

Ok what I see now is that when the applications stops no leak occurs when using purify. However, the application is still growing during runtime when each query action is made. This worries me. It still looks like its not freeing up the memory after the query has completed only when the application is torn down.

Any insight would of course be appreciated.

Thanks, Garyc

--- Matt Dargavel <ma@shout-telecoms.com> wrote:

Hi Gary,

This sounds like the leak Alex and myself looked at a while ago (see thread at http://lists.mysql.com/plusplus/5767 ). Warren implemented a patch for it (see thread at http://lists.mysql.com/plusplus/6012 ). I'm not sure it's been released yet, but it's available from svn.

Regards,

Matt.

gary clark wrote:

Hello,

Not sure what is going on but I think I have found the memory leak when running on windows using the purify tool from IBM.

I see Memory leak when calling the below code. new(UINT)

[f:\rtm\vctools\crt_bld\self_x86\crt\src\xiosbase.514]

std::ios_base::Init(void)[f:\rtm\vctools\crt_bld\self_x86\crt\src\xiobase

std::basic_ios<char,char_traits<char>::std>::init(basic_streambuf(char,char_traits<char>::std>::std

*,bool)

Ok this is why the leak occurred. I was using the below statement.

mysqlpp::Query query = con.query();

The query is being created every time which inturn creates an ostream which results in a leak. The query object I now pass as a reference and then reset the blighter which avoids the leak since only instantiated once.

Thanks, Garyc

-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: