According to this, Dispose() on a SqlConnection calls Close(), so you don't need to call both, just Dispose(). Is it the same for a SqlDataReader?
相关问题
- C# GC not freeing memory [duplicate]
- garbage collection best practices
- Ado.net performance:What does SNIReadSync do?
- Too many Garbage collection threads
- Java 7 G1GC strange behaviour
相关文章
- Code for inserting data into SQL Server database u
- Why do we need Dispose() method on some object? W
- On scala project - Getting error GC overhead limit
- How to manage parsing an null object for DateTime
- Azure Web App Temp file cleaning responsibility
- Is there a way to release unmanaged resources when
- Using NHibernate transaction in SqlBulkCopy
- Is there any way to force the Javascript Garbage C
You only need to call Dispose because calls Close.
I used .NET Reflector and found that DbDataReader's (the base of SqlDataReader) Dispose method does call Close.