Warren Young wrote:
> 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 know this is a mailing list, I was referring to deleting from the
archive. But ok, you can't; thanks for answering my question. =)
>> 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 never said I had diagnosed or otherwise narrowed down 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.
I built MySQL++ 1.7.40, and rebuilt my test project with that library.
The query object has no leak, tested with the same code. So, it may be
with MS's runtime library like you say.
At first I thought the problem was with MS's known std::basic_iostream
memory leaking problem. ( info here:
) However, I obtained a non-public hotfix from MS that supposedly fixed
that problem, which it looks like it did, when I test out
std::stringstream and std::iostream objects in a similar loop.
I will look into it some more. Anyone else having similar issues?
Thank you for your help.
- Bill K.