IDebugExpressionEvaluator2::TerminateIDebugExpressionEvaluator2::Terminate

停止並清除運算式評估工具。Stops and cleans up the expression evaluator.

語法Syntax

HRESULT Terminate (
    void
);
int Terminate ();

傳回值Return Value

如果成功,則傳回, S_OK 否則傳回錯誤碼。If successful, returns S_OK; otherwise, returns an error code.

備註Remarks

告知運算式評估工具正在清除它。Tells the expression evaluator when it is being cleaned up.

範例Example

下列範例示範如何針對公開 IDebugExpressionEvaluator2介面的 ExpressionEvaluatorPackage 物件,執行這個方法。The following example shows how to implement this method for a ExpressionEvaluatorPackage object that exposes the IDebugExpressionEvaluator2 interface.

STDMETHODIMP ExpressionEvaluatorPackage::Terminate(void)
{
    // scan the namespaces contained and delete
    EEExtensionMethodCache **ppChild = NULL;
    m_HashExtensionMethodCache.ResetHashIterator();
    while (ppChild = m_HashExtensionMethodCache.IterateHash())
    {
        delete *ppChild;
    }
    return VBEEImplicitVariables::Terminate();
}

另請參閱See also