axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damitha Kumarage <>
Subject Re: [Axis2]Add clone method to axis2_property
Date Thu, 23 Nov 2006 05:43:07 GMT
Samisa Abeysinghe wrote:

> Damitha Kumarage wrote:
>> Hi,
>> We copy properties from one ctx to another ctx often(in sandesha2 also)
> Would the old context be using the property after it being copied to 
> the new context? If so please provide an example.

For example application msg context is used to create a new related msg 
context for ackknowledgement. After that
application message context is continued in use.

> If not, you can re-set the property in the old context to NULL, after 
> copying the reference to the new context and and you can save memory 
> as well. 

I thought of cloning after the problems I faced in sandeshaya2 after 
memory leak fixes in axis2.  However I got rid
of those problems without using cloning. The problem was when I reset an 
property with the same key the orignal property was not freed earlier. 
After the fix, in which the original property is freed I got context 
errors. I avoided these
by not resetting the proprety but first checking whether an property is 
already is set for that key and if so replace the
value for that property with new value. If no property is already 
assigned for that key then only create a new property and set to message 

> Samisa...
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message