Quantcast
Channel: DataContext Memory Leak
Viewing all articles
Browse latest Browse all 3

DataContext Memory Leak

$
0
0

I am experiencing a memory leak with a data context in our application that I cant seem to find any information on google. When we wrap a data context in a using statement, the context does not seem to remove itself from memory. So if I have 10 using statements it will leave 10 references to the data context's. Much of the data is disposed of within the data context BUT each one will leave about 70 bytes in memory. I use Red-Gate ANTS to see all the classes sitting in memory... The issue seems to only occur when i call a stored procedure and get the FirstOrDefault method.

Is there anyway to stop this from happening?

By the way its .net 3.5 sp1..... and Linq to Sql.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images