• A
    Manage the lifetime of DkmClrValue objects · 0bef13b4
    Andrew Casey 提交于
    We need to attach the same information to DkmEvaluationResults and
    DkmEvaluationResultEnumContexts, but they have different lifetimes.  Enum
    contexts, which are, in some sense, the children of evaluation results are
    closed first.  As such we don't want to clean up our attached information
    until the evaluation result is closed.  When we are informed that this has
    happened (by a call to EvalResultDataItem.OnClose), we call Close on the
    associated DkmClrValue.
    
    We hope that actively managing the lifetime of DkmClrValue instances will
    improve perf by reducing the amount of work that the debugger has to do on
    each evaluation (which is proportional to the number of live
    DkmClrValues).
    
    Unfortunately, this will not improve perf in the large-array case because
    DkmEvaluationResults are not closed as they are scrolled out of view.
    
    Associated with DevDiv #1094428 (not yet on GitHub).
    0bef13b4
ResultProvider.cs 21.1 KB