|
以文本方式查看主题 - 计算机科学论坛 (http://bbs.xml.org.cn/index.asp) -- 『 XML源码及示例(仅原创和转载) 』 (http://bbs.xml.org.cn/list.asp?boardid=32) ---- IXMLDOMDocument 内存泄漏问题 (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=18953) |
|
-- 作者:hexiyajin -- 发布时间:5/28/2005 10:33:00 PM -- IXMLDOMDocument 内存泄漏问题 IXMLDOMDocument *pXMLDoc; ...... pXMLDoc->get_xml(...);//调用完怎么释放呢? 而且我感觉Release后,内存并没有释放!
[此贴子已经被作者于2005-5-28 23:21:36编辑过]
|
|
-- 作者:InfoPen -- 发布时间:7/7/2005 11:39:00 AM -- 同感,我也发帖求助了,但没人回。阁下解决了没? |
|
-- 作者:zybp1981 -- 发布时间:10/20/2005 4:18:00 PM -- 我也发现这个问题,内存一直在增长,事实上我已经在析构函数中释放了Dom对象,我的开发环境是VC6.0,下面是我写的一个类,请大侠赐教!!! ////////////////////////////////////////////////////////////////////// // Construction/ ////////////////////////////////////////////////////////////////////// MBTIXML::MBTIXML() { pXMLDom = NULL; } 'COMPONENT ID : LoadXML CoInitialize(NULL); if (FAILED(hr)) |
|
-- 作者:zybp1981 -- 发布时间:10/20/2005 4:20:00 PM -- 'COMPONENT ID : PickupNoteValue 'COMPONENT description : ' Get xml note value CString MBTIXML::PickupNoteValue(CString strQuery) { // You might need to add the msxml4/sdk/(inc, lib) directories // to the Tools->Options...->Directories in Visual Studio. // // You might also need to append "msxml2.lib" to the // Project->Settings...->Link->Object/Libray Modules field. IXMLDOMNode *pNode=NULL; BSTR bstr = NULL; CString strReturn; // Query a single node. if (!pNode) pNode->get_text(&bstr); return(strReturn); 'COMPONENT ID : CountElement int MBTIXML::CountElement(CString strQuery) pXMLDom->selectNodes(strQuery.AllocSysString(),&pNodeList); while (pNode) // Convert BSTR to CString VariantInit(&var); |
|
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
93.750ms |