Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 50324 invoked from network); 27 Oct 2005 09:07:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Oct 2005 09:07:58 -0000 Received: (qmail 13854 invoked by uid 500); 27 Oct 2005 09:07:53 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 13842 invoked by uid 500); 27 Oct 2005 09:07:53 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 13831 invoked by uid 99); 27 Oct 2005 09:07:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2005 02:07:53 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of anderserikss0n@hotmail.com designates 64.4.61.17 as permitted sender) Received: from [64.4.61.17] (HELO hotmail.com) (64.4.61.17) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2005 02:07:50 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 27 Oct 2005 02:07:31 -0700 Message-ID: Received: from 64.4.61.200 by by102fd.bay102.hotmail.msn.com with HTTP; Thu, 27 Oct 2005 09:07:31 GMT X-Originating-IP: [213.56.137.212] X-Originating-Email: [anderserikss0n@hotmail.com] X-Sender: anderserikss0n@hotmail.com Reply-To: anders@black-sand.net In-Reply-To: <009201c5dad2$91dacc70$421610ac@Avebury> From: "Anders Eriksson" To: axis-c-user@ws.apache.org Subject: Re: Memory Leak? Date: Thu, 27 Oct 2005 11:07:31 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 27 Oct 2005 09:07:31.0498 (UTC) FILETIME=[DCAA88A0:01C5DAD5] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The correct way to destroy complex objects is probably to use the static function Axis_Delete_setReturnAddPointsParameter(...) which you can find in setReturnAddPointsParameter.cpp. I haven't been looking at XSD_DOUBLE etc but if you say that these are created with new you are probably correct. /Anders >From: Tomaz Rotovnik >Reply-To: "Apache AXIS C User List" >To: Apache AXIS C User List >,anders@black-sand.net >Subject: Re: Memory Leak? >Date: Thu, 27 Oct 2005 10:43:57 +0200 > >Hi Anders > >I'm using Axis C client, but I suppose that the memory leaks are the same >right? I already tried with putting delete statements into destructor >classes but they are never called if I use free(pRAPP), where pRAPP is >setReturnAddPointsParameter*. So should I use delete instead of free? I'm a >little bit confused, because Management Guide about De-allocation Semantics >talks about usage of free statements. > >In case of deserialazing received parameters from web server I think that >statement "new" is used also for allocating basic types XSD_DOUBLE or >XSD_LONG. If is this true then this should be also deleted in destructor, >right? > >Best regards > >Tomaz > > >----- Original Message ----- From: "Anders Eriksson" > >To: >Sent: Thursday, October 27, 2005 10:01 AM >Subject: RE: Memory Leak? > > >> >>Hi Tomaz, >> >>I have been looking in to the memory leaks in the Axis C server >>a bit. >> >>I found that in complex objects strings are not deleted. You can >>add the delete statments in your setReturnAddPointsParameter >>class destructor. >> >>Moreover there is a leak in in Apache1_3module (mod_axis.dll), >>in ApacheTransport.cpp where m_pBuffers is not deleted. >> >>I have been requested to do a svn patch but as I am not >>working on the lastest version I have not found the time to do >>this. I will do it as soon as I can... >> >>/Anders >> >>>From: "Tomaz Rotovnik" >>>Reply-To: "Apache AXIS C User List" >>>To: "Apache AXIS C User List" >>>Subject: Memory Leak? >>>Date: Wed, 26 Oct 2005 18:04:26 +0200 >>> >>>Hi >>> >>>I'm using axis 1.5 C++. When I tested my client (multithreaded) I found >>>out that memory is growing with number of transactions. I read Axis C++ >>>Memory Management Guide about De-allocation Semantics. >>> >>>For example WSDL2XML generated this parts of code >>> >>>Parameters that will be send over the web >>> >>> m_pCall->addParameter((void*)&Value0, "lTerminalID", XSD_LONG); >>> m_pCall->addParameter((void*)Value1, "sMSISDN", XSD_STRING); >>> m_pCall->addParameter((void*)&Value2, "dAmount", XSD_DOUBLE); >>> >>>We expect next received parameters: >>> >>>xsd__string sBlpType; >>>xsd__double dAmount; >>>xsd__string lTransactionID; >>> >>>Where and How can I delete memory for this parameters? >>> >>>Return function is something like that >>> >>>MPBLPSoap::AddPoints(xsd__long Value0, xsd__string Value1, xsd__double >>>Value2){ >>>... >>>pReturn = (setReturnAddPointsParameter*)m_pCall->getCmplxObject((void*) >>>Axis_DeSerialize_setReturnAddPointsParameter, (void*) >>>Axis_Create_setReturnAddPointsParameter, (void*) >>>Axis_Delete_setReturnAddPointsParameter,"AddPointsResult", 0); >>>... >>>} >>> >>>and this is part of calling statement: >>> >>>setReturnAddPointsParameter* pRAPP = NULL; >>>MPBLPSoap pBLP_authorize(sMPG.strURL.c_str(), APTHTTP1_1); >>>pBLP_authorize.Timeout(sMPG.iHTTPTimeoutSec); >>>pRAPP = pBLP_authorize.AddPoints(1,sTr.szMSISDN,sTr.dAmount); >>> >>>After successful operation I call >>> >>>free(pRAPP) >>> >>>but unfortunately I still get memory leak. I checked with Trial version >>>of IBM PurifyPlus and it suspects that memory leak exists because of >>>unallocated parameters : >>> >>>m_pCall->addParameter((void*)Value1, "sMSISDN", XSD_STRING); >>> >>>xsd__string sBlpType; >>>xsd__double dAmount; >>>xsd__string lTransactionID; >>> >>>I also checked what calling free do: It erases the pointers (they become >>>undefined), so they are de-allocated right? >>> >>>But memory is still growing with each transaction and Purify always shows >>>on the same problem. >>> >>> >>>I also find out that new char is created when calling >>>m_pCall->addParameter((void*)Value1, "sMSISDN", XSD_STRING); >>>so when is this array deleted? >>> >>>Any suggestions are welcome. >>> >>>Tomaz >> >>_________________________________________________________________ >>Senaste nytt fr�n motormarknaden http://motor.msn.se/ >> > _________________________________________________________________ J�mf�r och hitta b�st pris p� MSN Shopping http://shopping.msn.se/