From 40a4e2914181e842c3fdd38e8c9b3a6a30f9a1f3 Mon Sep 17 00:00:00 2001 From: yupeng_dyp Date: Mon, 28 Oct 2024 04:37:12 +0000 Subject: [PATCH] update src/CAD/IFox.CAD.Shared/Runtime/DBTrans.cs. Signed-off-by: yupeng_dyp --- src/CAD/IFox.CAD.Shared/Runtime/DBTrans.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CAD/IFox.CAD.Shared/Runtime/DBTrans.cs b/src/CAD/IFox.CAD.Shared/Runtime/DBTrans.cs index ab192da..0f58b69 100644 --- a/src/CAD/IFox.CAD.Shared/Runtime/DBTrans.cs +++ b/src/CAD/IFox.CAD.Shared/Runtime/DBTrans.cs @@ -538,6 +538,10 @@ private void Dispose(bool disposing) // 将文档锁销毁 _documentLock?.Dispose(); + //直接以文件 new 事务,最好及时释放 Database + if (!string.IsNullOrWhiteSpace(_fileName)) + Database.Dispose(); + // 将当前事务栈弹栈 DBTransStack.Pop(); IsDisposed = true; -- Gitee