1、正常C# 是继承GC,是无需手动回收释放,但是有时候确实遇到相关异常报错,手动释放是可以的
finally { if (conn != null && conn.State != ConnectionState.Closed) { conn.Close(); SqlConnection.ClearPool(conn); conn.Dispose(); GC.Collect(); } }
标签:释放,C#,手动,回收,GC,conn From: https://www.cnblogs.com/yuanshuo/p/16733836.html