Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 22149 invoked from network); 17 May 2006 10:56:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 May 2006 10:56:53 -0000 Received: (qmail 50400 invoked by uid 500); 17 May 2006 10:56:49 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 50386 invoked by uid 500); 17 May 2006 10:56:49 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 50375 invoked by uid 99); 17 May 2006 10:56:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 03:56:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of damitha23@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wr-out-0506.google.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 03:56:48 -0700 Received: by wr-out-0506.google.com with SMTP id i2so75962wra for ; Wed, 17 May 2006 03:56:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:content-type:content-transfer-encoding; b=OuUGQY6w8JuYrA+wFrTsra5DWc1bXoZoOqRfqUeI6s7H5GgZ7xZCQfA5HDWV8xzBd9SdtAAI69hyMqgQabf+0bIN3RMoG8h48FkOb70lZ5kg5aLzqC9LSHszJUKpKR9S3GgYTkOiM8dvgF7Of6ujsQQ0TznCU9i09U2xlPAThHc= Received: by 10.54.78.20 with SMTP id a20mr2307605wrb; Wed, 17 May 2006 03:56:27 -0700 (PDT) Received: from ?192.168.1.180? ( [222.165.181.212]) by mx.gmail.com with ESMTP id 8sm1753124wra.2006.05.17.03.56.24; Wed, 17 May 2006 03:56:26 -0700 (PDT) Message-ID: <446B013C.9040500@gmail.com> Date: Wed, 17 May 2006 16:55:56 +0600 From: Damitha Kumarage User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-c-dev@ws.apache.org Subject: [Axis2] A Memory handling strategy. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, There are schenarios where we set void pointers and the receivers of these void pointers have no way of freeing the memory associated with them. We faced that problem yesterday when paramter attributes needed to be set in axis2_param_t. axis2_param_t belong to util project. So we cannot have om dependancies in axis2_param when it wants to free om attributes. To handle this situation I introduced a new class called axis2_generic_obj_t. We can set the concerned type(or void pointer) as value there in and at the same time set the freeing function there in. So when someone free the axis2_generic_obj_t object instance it will call the call back free function from within and free the set value. If you have any concerns about this strategy please let's discuss thanks Damitha