Home All Groups Group Topic Archive Search About

Followup to Memory leak in SQLDataReader()

Author
23 Feb 2006 3:08 PM
Ken Varn
This is a follow up to the post that I made concerning a possible memory
leak in SQLDataReader().

I have finally narrowed down the cause.  The managed C++ thread that was
using the DataReader had made a call to CoInitialize() because it formally
used straight ADO before I converted it to ADO.NET.  When I comment out the
CoInitialize() call, the memory leak appears to no longer occur.

Now, my question is why does ADO.NET SQLDataReader appear to leak memory if
CoInitialize() is called on the thread that is using it?  This could be a
problem if I need to utilize other COM objects on the thread that is using
ADO.NET in managed C++.


--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

AddThis Social Bookmark Button