提交 37da9a15 编写于 作者: S Sam Harwell

Remove the single-dispose requirement for DisposableToolTip

上级 292851d1
......@@ -13,8 +13,6 @@ internal sealed class DisposableToolTip : IDisposable
public readonly ToolTip ToolTip;
private PreviewWorkspace _workspaceOpt;
private bool _disposed;
public DisposableToolTip(ToolTip toolTip, PreviewWorkspace workspaceOpt)
{
ToolTip = toolTip;
......@@ -23,10 +21,7 @@ public DisposableToolTip(ToolTip toolTip, PreviewWorkspace workspaceOpt)
public void Dispose()
{
Debug.Assert(!_disposed);
_disposed = true;
_workspaceOpt?.Dispose();
_workspaceOpt = null;
Interlocked.Exchange(ref _workspaceOpt, null)?.Dispose();
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册