Пример #1
0
void CCandidateList::_EndCandidateList(){
    if (_pCandidateWindow){
        _pCandidateWindow->_Destroy();
        delete _pCandidateWindow;
        _pCandidateWindow = NULL;
    }

    if (_pRangeComposition){
       _pRangeComposition->Release();
       _pRangeComposition = NULL;
    }

    if (_pContextCandidateWindow){
       _UnadviseContextKeyEventSink();
       _pContextCandidateWindow->Release();
       _pContextCandidateWindow = NULL;
    }

    if (_pContextDocument){
       _UnadviseTextLayoutSink();
       _pContextDocument->Release();
       _pContextDocument = NULL;
    }

    if (_pDocumentMgr){
       _pDocumentMgr->Pop(0);
       _pDocumentMgr->Release();
       _pDocumentMgr = NULL;
    }
}
void CCandidateList::_EndCandidateList()
{
	if(_pCandidateWindow != NULL)
	{
		_pCandidateWindow->_EndUIElement();
		_pCandidateWindow->_Destroy();
	}
	SafeRelease(&_pCandidateWindow);

	SafeRelease(&_pRangeComposition);

	_UnadviseContextKeyEventSink();
	SafeRelease(&_pContextCandidateWindow);

	_UnadviseTextLayoutSink();
	SafeRelease(&_pContextDocument);

	if(_pDocumentMgr != NULL)
	{
		_pDocumentMgr->Pop(0);
	}
	SafeRelease(&_pDocumentMgr);
}