I was exploring the possibility that one of my applications might have a memory leak, so I started playing with some very basic code samples. One of them, which I ended up with, has significantly increased over time in terms of the number of pens (> 3000). This is a very simple console application with code as follows:
public static void Main(string[] args) { using (SqlConnection sqlConnection = new SqlConnection()) { } Console.ReadLine(); }
The output of the SqlConnection call eliminates any increase in Handle, so I assume it has something to do with the connection pool. But since it only starts once before basically going to wait for input, why does the handle counter keep increasing?
Thanks.
source share