You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Gareth Reakes <ga...@decisionsoft.com> on 2003/10/01 18:25:52 UTC

Re: Deleting something returned by XMLString::replicate crashes when application is using the release build of Xerces-C++ ?

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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Deleting something returned by XMLString::replicate crashes when application is using the release build of Xerces-C++ ?

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Dave,
	I think you are right. I will make the appropriate changes.


Gareth
	


On Wed, 1 Oct 2003, david_n_bertoni@us.ibm.com wrote:

> 
> 
> 
> 
> 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                                                                                                               
>                       <gareth@decision         To:      "xerces-c-dev@xml.apache.org" <xe...@xml.apache.org>                               
>                       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
> 
> >                       <gareth@decision         To:
> "xerces-c-dev@xml.apache.org" <xe...@xml.apache.org>
> 
> >                       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: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> >
> 
> --
> Gareth Reakes, Head of Product Development  +44-1865-203192
> DecisionSoft Limited                        http://www.decisionsoft.com
> XML Development and Services
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> 

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




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Deleting something returned by XMLString::replicate crashes when application is using the release build of Xerces-C++ ?

Posted by da...@us.ibm.com.



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                                                                                                               
                      <gareth@decision         To:      "xerces-c-dev@xml.apache.org" <xe...@xml.apache.org>                               
                      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

>                       <gareth@decision         To:
"xerces-c-dev@xml.apache.org" <xe...@xml.apache.org>

>                       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: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
>

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




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Deleting something returned by XMLString::replicate crashes when application is using the release build of Xerces-C++ ?

Posted by Gareth Reakes <ga...@decisionsoft.com>.
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                                                                                                                 
>                       <gareth@decision         To:      "xerces-c-dev@xml.apache.org" <xe...@xml.apache.org>                                 
>                       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: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> 

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




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Deleting something returned by XMLString::replicate crashes when application is using the release build of Xerces-C++ ?

Posted by da...@us.ibm.com.



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                                                                                                                 
                      <gareth@decision         To:      "xerces-c-dev@xml.apache.org" <xe...@xml.apache.org>                                 
                      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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org