axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damitha Kumarage <damith...@gmail.com>
Subject Re: [Axis2]Add clone method to axis2_property
Date Wed, 22 Nov 2006 09:38:26 GMT
Nandika Jayawardana wrote:

> hi,
>
> In addtion to a clone method, if we can change the property create 
> function to
> accept other arguments as well, it would be lot more convenient to use 
> properties,
>
> Instead of
>
> AXIS2_EXTERN axis2_property_t * AXIS2_CALL
> axis2_property_create(const axis2_env_t *env);
>
> have
>
> AXIS2_EXTERN axis2_property_t* AXIS2_CALL
> axis2_property_create(const axis2_env_t *env,
>                                  void *value,
>                                  AXIS2_FREE_VOID_ARG free_func,
>                                  axis2_scope_t *scope);

Since we have used axis2_property_create(env) and then set values in so 
many places changing the
method will involve lot of work. So I suggest

AXIS2_EXTERN axis2_property_t* AXIS2_CALL
axis2_property_create_with_args(
     const axis2_env_t *env,
     void *value,
     AXIS2_FREE_VOID_ARG free_func,
     axis2_scope_t *scope);
Then we can slowly shift using the new creator
Damitha

>
> Regards
> Nandika
>
> On 11/22/06, *Dinesh Premalal* <xydinesh@gmail.com 
> <mailto:xydinesh@gmail.com>> wrote:
>
>     Hi,
>
>     Damitha Kumarage < damitha23@gmail.com
>     <mailto:damitha23@gmail.com>> 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.
>
>     comments please ...
>
>     BTW , I'm +1 to some kind of mechanism to handle this scenario.
>
>     thanks,
>     Dinesh
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>     <mailto:axis-c-dev-unsubscribe@ws.apache.org>
>     For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>     <mailto:axis-c-dev-help@ws.apache.org>
>
>


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


Mime
View raw message