Hi, I have a connection leak in my web application which can be identified as this code - which looks quite innocent to me. What am I missing?
I can reproduce the problem when I set Max Pool Size to a small number.
using (var reader = (SqlDataReader) dao.GetAsDataReader(null, fields, filter1, relations1,
CommandBehavior.Default, 0, true))
{
while (reader.Read())
{
AnnotationCode ac1 = new AnnotationCode();
ac1.Value = reader.GetInt64(0);
ac1.Name = reader.GetString(1);
a.AvailableOptions.Add(ac1);
}
reader.Close();
}
I Played around with reader.close() but no change. Shouldnt IDisposable / using() release the connection?
LLBLGEN 5.2.3, .net 4.7 (ASP.Net MVC5), SQL Server 2016