From: Warren Young Date: June 21 2006 5:30pm Subject: Re: Query Object Memory Leak? List-Archive: http://lists.mysql.com/plusplus/5746 Message-Id: <4499822E.5090103@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Bill K wrote: > Maybe a mod. can delete that post? Ahahaha. This is a mail list. I can't delete emails from other people's inboxes. Theoretically I could remove it from the archives, but most of the damage has already been done. Live and learn, dude. :) > I am developing code that needs to create query objects often. There > seems to be a memory leak - memory not being released by the query > object when it goes out of scope. I think you've misdiagnosed the problem. I ran your test code on a Linux box, and the amount of memory stays static throughout the program's run time. Between this and what I see in the call stack window when after it crashes, I think it's more likely that the problem is somewhere down in VC++'s runtime library. If you're motivated enough, an interesting test would be to revert Query back to the old style stream mechanism. (See the v2.0.0 ChangeLog entry.) We couldn't make that reversion permanent, because the old stream style is obsolete, but it would tell us whether I'm right about where the problem is. If the symptom changes, it's in the runtime library.