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. XML / XSL
  4. Memory leak?

Memory leak?

Scheduled Pinned Locked Moved XML / XSL
c++xmlperformancequestion
3 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.
  • L Offline
    L Offline
    LaxRoth
    wrote on last edited by
    #1

    Hi, i'm trying to load an xml document from C++ with: MSXML::IXMLDOMDocumentPtr pXMLDocument (__uuidof (MSXML:OMDocument)); // main document parsed hr = pXMLDocument->loadXML (BSTRTemp); /* trying parse string, if success, we have doc object*/ this method uses offensive memory. i have xml files that are about 100MB size. i feel the function does not clear the memory. anyone an idea? if i load 3 times the same file, my memory is full. :confused: suggestion? is there a free method or something? thank you, lutz

    P 1 Reply Last reply
    0
    • L LaxRoth

      Hi, i'm trying to load an xml document from C++ with: MSXML::IXMLDOMDocumentPtr pXMLDocument (__uuidof (MSXML:OMDocument)); // main document parsed hr = pXMLDocument->loadXML (BSTRTemp); /* trying parse string, if success, we have doc object*/ this method uses offensive memory. i have xml files that are about 100MB size. i feel the function does not clear the memory. anyone an idea? if i load 3 times the same file, my memory is full. :confused: suggestion? is there a free method or something? thank you, lutz

      P Offline
      P Offline
      Philip Fitzsimons
      wrote on last edited by
      #2

      loading a 100mb xml file into the DOM model is going to hurt - you can expect it to take up 10 times the size on disk when its in memory.... so you could use the MSXML 3.0 Sax implementation instead... http://www.xml.com/pub/a/2002/03/06/efficient.html?page=last&x-order=date[^]


      "When the only tool you have is a hammer, a sore thumb you will have."

      L 1 Reply Last reply
      0
      • P Philip Fitzsimons

        loading a 100mb xml file into the DOM model is going to hurt - you can expect it to take up 10 times the size on disk when its in memory.... so you could use the MSXML 3.0 Sax implementation instead... http://www.xml.com/pub/a/2002/03/06/efficient.html?page=last&x-order=date[^]


        "When the only tool you have is a hammer, a sore thumb you will have."

        L Offline
        L Offline
        LaxRoth
        wrote on last edited by
        #3

        hi, thx for your answers. after several tests i think i will have to do this.:laugh:

        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