提交 771d6c96 编写于 作者: S Sam Harwell

Simplify the release of the database handle

上级 de40b567
......@@ -91,7 +91,8 @@ private SqlConnection(SafeSqliteHandle handle, IPersistentStorageFaultInjector f
internal void Close_OnlyForUseBySqlPersistentStorage()
{
Contract.ThrowIfNull(_handle);
// Dispose of the underlying handle at the end of cleanup
using var _ = _handle;
// release all the cached statements we have.
//
......@@ -104,9 +105,6 @@ internal void Close_OnlyForUseBySqlPersistentStorage()
}
_queryToStatement.Clear();
// Finally close our handle to the actual DB.
_handle.Dispose();
}
public void ExecuteCommand(string command, bool throwOnError = true)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册