ast*_*ght 2 c# memory-leaks exception-handling using
try
{
using (MapDataContainer ent = new MapDataContainer()) //is an autogen'd EF object
{
//do some stuff, assume it throws an error
}
}
catch(Exception ex) //catching outside using not sure if IDispose called
{
//handle error
}
Run Code Online (Sandbox Code Playgroud)
通常我理解在EF对象上使用称为IDispose.所以假设它抛出一个异常......这是一个可能的内存泄漏情况吗?