I have the same problem to freeze the memory.  By using the sample code from
SAXPRINT such as:

        delete parser;
        XMLPlatformUtils::Terminate();

The memory does not seem to be freezed, until the process is finished.

Can someone help?

P Chiang

-----Original Message-----
From: Jason Jesso [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 11:15 AM
To: [EMAIL PROTECTED]
Subject: Re: xerces and threads


I am confused.  Can I free each parser?

"Murphy, James" wrote:

> > The server will create a thread for each connection made and
> > in turn an
> > IDOMParser.  When the connection is terminated, can I free up
> > that individual
> > parser?
>
> Yes, your heap will thank you for it!  Most of the dynamic memory consumed
> during an IDOMParser:parse operation comes from a heap local to the
parser.
> FWIU, This was much of the point of the IDOM project.  failing to free it
> will leak _lots_ of memory - you would have found it before long I'm sure!
>
> BTW, I hope you are considering a threadpool instead of creating a new
> thread for each connection.
>
>
> > Or is all memory cleaned up when Terminate() is called?  I
> > could have many,
> > many connections and the server can run a long time.  I
> > wouldn't want to run
> > out of memory.
>
> Terminate just frees some globals - not parser allocated memory.  Call it
> once at server shutdown (if at all).
>
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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



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

Reply via email to