W
wobbles
Hi Everyone,
I've read most of the posts regarding "Dispose" in this NG.
I still have some questions.
If I declare and use a disposable object (say a DB connection) within
a method, is it worth calling Dispose() within my "finally" block,
even if that object only has local scope?
When the thread exits this method, won't the GC collect my disposable
object regardless of whether I call Dispose() or not?
What would be the difference between calling Dispose() here and not
calling Dispose()?
Thanks for clearing my confusion...
Wobbles
I've read most of the posts regarding "Dispose" in this NG.
I still have some questions.
If I declare and use a disposable object (say a DB connection) within
a method, is it worth calling Dispose() within my "finally" block,
even if that object only has local scope?
When the thread exits this method, won't the GC collect my disposable
object regardless of whether I call Dispose() or not?
What would be the difference between calling Dispose() here and not
calling Dispose()?
Thanks for clearing my confusion...
Wobbles