提交 8e77c1f0 编写于 作者: A Andrew Casey

Call DkmClrValue.Close more conservatively

The problem arises when more than one expansion shares the same value -
for example, those parented by a common AggregateExpansion.  Since this is
an optimization anyway (the debugger would eventually close them on its
own), we'll just conservatively focus on data items without children.

Fixes #901.
上级 9c97fcf7
......@@ -154,7 +154,15 @@ private static DkmEvaluationResultFlags GetFlags(DkmClrValue value, DkmInspectio
protected override void OnClose()
{
Value.Close();
// If we have an expansion, there's a danger that more than one data item is
// referring to the same DkmClrValue (e.g. if it's an AggregateExpansion).
// To be safe, we'll only call Close when there's no expansion. Since this
// is only an optimization (the debugger will eventually close the value
// anyway), a conservative approach is acceptable.
if (this.Expansion == null)
{
Value.Close();
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册