Hello everyone.

By seeing unix "top" command,
I found out the thing that memories kept increasing 
in my sample program (which is mentioned in the end
of this mail). 

By the way I am using xerces-c++ verion 2.2.0 on 
Redhat Linux 7.3.

Where is wrong in my program ?
 
------ sample program starts --------

#include <xercesc/dom/DOM.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationRegistry.hpp>
#include <xercesc/util/PlatformUtils.hpp>

using namespace std;
using namespace xercesc;

#define X(x) XMLString::transcode(x)

int main() {
  for (int i=0;i<5000000;i++) {
    XMLPlatformUtils::Initialize();
    {
      DOMImplementation* impl =
 DOMImplementationRegistry::getDOMImplementation(X(""));
      DOMDocument* doc = impl->createDocument( X("aaaaa" ), 
            X("bbbbb:ccccc"), NULL );
      DOMElement* drugMLElement = doc->getDocumentElement();
      drugMLElement->setAttribute( X("dddddd"),
       X("http://eeeee") );
      doc->release();

    }
    XMLPlatformUtils::Terminate();
  }
  return 1;
}

------------
M. Hamada

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to