Samisa Abeysinghe wrote:

Dinesh Premalal wrote:

Hi,

Damitha Kumarage <[EMAIL PROTECTED]> writes:

Hi,
We copy properties from one ctx to another ctx often(in sandesha2 also)
This lead to problems in Sandesha2.
To avoid this would like to add a clone function ot axis2_property
like we have done in
aixs2_qname.

If we can maintain a reference counter, we could be able to get rid of
double freeing etc. Every time you referencing to that property
reference counter increases. Reference counter decrements when
freeing. Actual Freeing occurred when reference counter reaches to 0.
I think this method will be less expensive than cloning.

Ref count solved the problem but increases coupling. It becomes hard to use it with all the places needing a reference having to deal with ref count.

But it seems we have to keep a reference count. Otherwise it is impossible to create a new context using exising context. So it seems that we need to add an add_ref function to aixs2_property. As Dinesh said when axis2_property_free is called this ref count is decreased by 1 and when it is 0 actual freeding should happen
Damitha


Samisa...


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