Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Regarding MSXML3.0 [modified]

Regarding MSXML3.0 [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
xmlperformancequestionannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    voorugonda prashanth
    wrote on last edited by
    #1

    Hi All, i'm using IXMLDOMDocumentPtr for loading xml and do operations on it. when i run my application with purify it is showing a memory leak in CreateInstance & loadXML. please give me a suggestion where am i wrong? or what changes i need to do. here is my sample code: BSTR bstrUserInputsXml=NULL; { CoInitialize(NULL); IXMLDOMDocumentPtr pXMLDom=NULL; hr=pXMLDom.CreateInstance( "Microsoft.XMLDOM" ); //hr=pXMLDom.CreateInstance( __uuidof(MSXML2::DOMDocument40)); if(FAILED(hr)) { //cout<<"Failed to instantiate DOMDocument40"<load("D:\\userinputs1.xml")!= VARIANT_TRUE) { //MessageBox(NULL,"Failed load xml string","KeyTable.s",MB_OK); return ; } bstrUserInputsXml = pXMLDom->xml; pXMLDom.Release(); CoUninitialize(); } Thanks in advance. Prashanthv -- modified at 14:02 Friday 27th April, 2007

    B 1 Reply Last reply
    0
    • V voorugonda prashanth

      Hi All, i'm using IXMLDOMDocumentPtr for loading xml and do operations on it. when i run my application with purify it is showing a memory leak in CreateInstance & loadXML. please give me a suggestion where am i wrong? or what changes i need to do. here is my sample code: BSTR bstrUserInputsXml=NULL; { CoInitialize(NULL); IXMLDOMDocumentPtr pXMLDom=NULL; hr=pXMLDom.CreateInstance( "Microsoft.XMLDOM" ); //hr=pXMLDom.CreateInstance( __uuidof(MSXML2::DOMDocument40)); if(FAILED(hr)) { //cout<<"Failed to instantiate DOMDocument40"<load("D:\\userinputs1.xml")!= VARIANT_TRUE) { //MessageBox(NULL,"Failed load xml string","KeyTable.s",MB_OK); return ; } bstrUserInputsXml = pXMLDom->xml; pXMLDom.Release(); CoUninitialize(); } Thanks in advance. Prashanthv -- modified at 14:02 Friday 27th April, 2007

      B Offline
      B Offline
      bob16972
      wrote on last edited by
      #2

      Are you sure there is a memory leak with that code snippet?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups