Hi Gareth,

A better solution would be make XMLString::replicate() a non-inline
function.  Too many people already are confused by XMLString::transcode(),
etc., and I worry that an exception like this will just create more
confusion.  It would great if people actually read the documentation before
they used the code, but they don't always do that, so relying is
problematic.

Thanks!

Dave



                                                                                       
                                                           
                      Gareth Reakes                                                    
                                                           
                      <[EMAIL PROTECTED]         To:      "[EMAIL PROTECTED]" <[EMAIL 
PROTECTED]>                               
                      soft.com>                cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                                      
                                               Subject: Re: Deleting something 
returned by XMLString::replicate crashes    when    application is 
                      10/01/2003 09:45         using the release build of Xerces-C++ ? 
                                                           
                      AM                                                               
                                                           
                      Please respond                                                   
                                                           
                      to xerces-c-dev                                                  
                                                           
                                                                                       
                                                           



Hey David,

             I missed that - its rather a good point! So in fact it does
more
than defeat the purpose, it may actually cause crashes. I think the
documentation should therefore be changed to state that you should not
call release on replicate under any circumstances. Would you agree?


Gareth


>
> Hi all,
>
> I think the problem is that XMLString::replicate() is inline, so the
memory
> will come from the heap of the particular module that's making the call.
> The defeats the purpose of having XMLString::release().
>
> Dave
>
>
>
>

>                       Gareth Reakes

>                       <[EMAIL PROTECTED]         To:
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]>

>                       soft.com>                cc:      (bcc: David N
Bertoni/Cambridge/IBM)

>                                                Subject: Re: Deleting
something returned by XMLString::replicate crashes    when    application
is
>                       10/01/2003 09:25         using the release build of
Xerces-C++ ?
>                       AM

>                       Please respond

>                       to xerces-c-dev

>

>
>
>
> Hi,
>              sorry about the delay in replying - I needed to get some
info
> from
> other developers and they were not around. The documentation is currently
> incorrect. If you allocate with the replicate that uses the memory
manager
> then you cannot call release on it. Are you doing this?
>
> Gareth
>
> --
> Gareth Reakes, Head of Product Development  +44-1865-203192
> DecisionSoft Limited                        http://www.decisionsoft.com
> XML Development and Services
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]
>
>
>

--
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
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