Hi again,
I got some help tracking the problem down and now know
that the variable that is leaking memory is an
OleDBDataReader - I close it, but all of the memory that
was allocated for it remains. Any ideas on how to clear
this up? I need to keep the database connection open.
Thanks,
Tim
>-----Original Message-----
>Hello,
[quoted text clipped - 15 lines]
>Tim
>.
0to60 - 29 Dec 2003 17:09 GMT
> Hi again,
> I got some help tracking the problem down and now know
> that the variable that is leaking memory is an
> OleDBDataReader - I close it, but all of the memory that
> was allocated for it remains. Any ideas on how to clear
> this up? I need to keep the database connection open.
Are you referring to .Close()ing it or to setting the variable to null and
it being garbage collected?
If you mean .Close(), it is possible that the memory used is held onto in
case of another .Open(). If you mean you're setting the variable to null
(or it goes out of scope, or you .Dispose() it), the garbage collector runs
in a non-deterministic manner, meaning it will deallocate the memory
whenever it feels like it and you needn't be concerned.