"Cornelius, Martin" wrote:

>
> ---------------------------------------------------------------------------
> //  XMLElementDecl: Setter Methods
> //
> ---------------------------------------------------------------------------v
> oid
> XMLElementDecl::setElementName(const XMLCh* const       prefix
>                             , const XMLCh* const        localPart
>                             , const int                 uriId )
> {
>    delete fElementName;
>    fElementName = new QName(prefix, localPart, uriId);
>                            ^^^^^^^^
> }
>
> If new Qname throws bad_alloc due to (temporary) memory shortage, we face
> the same problem here

But actually the QName constructor itself is under the try/catch block:

QName::QName(const XMLCh* const        prefix
           , const XMLCh* const        localPart
           , const unsigned int        uriId
            ) :
      fPrefix(0)
    , fPrefixBufSz(0)
    , fLocalPart(0)
    , fLocalPartBufSz(0)
    , fRawName(0)
    , fRawNameBufSz(0)
    , fURIId(0)
{
    try
    {
        //
        //  Just call the local setters to set up everything. Too much
        //  work is required to replicate that functionality here.
        //
        setName(prefix, localPart, uriId);
    }

    catch(...)
    {
        cleanUp();
    }
}

So I think it should be ok in this particular scenario.



> Alas, i found that i had
> to drop schema-validation as well because it's hard-wired to use dom for
> parsing the schema 8-(.

Just FYI, in the latest nightly build, Khaled has modified the code to use IDOM
instead of DOM in the schema-validation for better performance.

Tinny



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

Reply via email to