I am developing a Web Application using ASP.NET 4/VB.NET with web forms and using MS SQL Server 2012 Express Advanced Edition as back end.
My application is huge and there are so many lines of code which contains SqlDataReaders
and SqlConnection
objects in huge numbers(hundreds of).
I took precautions to use Using
statement and Try.. Catch.. Finally
statements everywhere so that DataReader or Connection object is closed for sure.
Still, is there a way I can check from thousands of line of code, which DataReader or Connection I forgot to close?