привет, all!
есть класс с такими членами:
MSXML2::IXSLProcessorPtr m_spIXSLProcessor;
MSXML2::IXSLTemplatePtr m_spIXSLTemplate;
MSXML2::IXMLDOMDocument2Ptr m_spStyleSheet;
в одном из методов они работают:
if ( m_spIXSLTemplate == NULL ) {
hr = m_spIXSLTemplate.CreateInstance(__uuidof(MSXML2::XSLTemplate30));
if ( FAILED(hr) )
throw _com_error(hr);
m_spIXSLTemplate.AddRef();
}
if ( m_spStyleSheet == NULL) {
hr = m_spStyleSheet.CreateInstance(__uuidof(MSXML2::FreeThreadedDOMDocument30));
if ( FAILED(hr) )
throw _com_error(hr);
m_spStyleSheet.AddRef();
}
m_spStyleSheet->async = VARIANT_FALSE;
bSuccess = m_spStyleSheet->load(translatorFile);
m_spIXSLTemplate->PutRefstylesheet(m_spStyleSheet);
m_spIXSLProcessor = m_spIXSLTemplate->createProcessor();
m_spIXSLProcessor.AddRef();
а в десктрукторе класса валятся Access violation при удалении описанных выше членов
без AddRef тож не работает
памагите!!!!!