Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 8291 invoked from network); 28 May 2004 16:28:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 May 2004 16:28:09 -0000 Received: (qmail 71464 invoked by uid 500); 28 May 2004 16:28:21 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 71440 invoked by uid 500); 28 May 2004 16:28:21 -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 71387 invoked by uid 98); 28 May 2004 16:28:19 -0000 Received: from aslom@cs.indiana.edu by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(129.79.246.27):. Processed in 0.062624 secs); 28 May 2004 16:28:19 -0000 X-Qmail-Scanner-Mail-From: aslom@cs.indiana.edu via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(129.79.246.27):. Processed in 0.062624 secs) Received: from unknown (HELO whale.cs.indiana.edu) (129.79.246.27) by hermes.apache.org with SMTP; 28 May 2004 16:28:19 -0000 Received: from [127.0.0.1] (whale.cs.indiana.edu [129.79.246.27]) by whale.cs.indiana.edu (8.12.10/8.12.10/IUCS_2.61) with ESMTP id i4SGRwn4010775; Fri, 28 May 2004 11:27:58 -0500 (EST) Message-ID: <40B7688A.4040206@cs.indiana.edu> Date: Fri, 28 May 2004 11:27:54 -0500 From: Aleksander Slominski User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en MIME-Version: 1.0 To: Apache AXIS C Developers List Subject: memory management and AXIS_DEFINED_ARRAY Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hi, how is it supposed to be used - if i return new allocated AXIS_DEFINED_ARRAY will it be automatically deallocated?! for example is this valid way to do echo? i have seen it in InteropTestPortType.cpp so that should be fine though in this case i do not understand who is de-allocating memory as xsd__int_Array is passed as input and returned as output? shouldnt service clone the array or auto pointer be used? xsd__int_Array Benchmark1PortType::echoInts(xsd__int_Array Value0) { return Value0; } and what about returning new value? xsd__int_Array Benchmark1PortType::sendInts(int length) { xsd__int_Array arr; arr.m_Size = length; arr.m_Array = (int *) malloc(length * sizeof(int)); // fill in array with values return arr; } will it be de-allocated? do i miss something (documentation, examples)? thanks, alek -- The best way to predict the future is to invent it - Alan Kay