Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 89685 invoked from network); 6 Jun 2004 03:39:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jun 2004 03:39:09 -0000 Received: (qmail 96068 invoked by uid 500); 6 Jun 2004 03:39:13 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 96046 invoked by uid 500); 6 Jun 2004 03:39:12 -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 96032 invoked by uid 99); 6 Jun 2004 03:39:12 -0000 Received: from [209.68.1.20] (HELO relay.pair.com) (209.68.1.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Sat, 05 Jun 2004 20:39:12 -0700 Received: (qmail 45221 invoked from network); 6 Jun 2004 03:38:54 -0000 Received: from unknown (HELO SusanthaNB) (203.94.92.207) by relay.pair.com with SMTP; 6 Jun 2004 03:38:54 -0000 X-pair-Authenticated: 203.94.92.207 From: "Susantha Kumara" To: "'Apache AXIS C Developers List'" Subject: RE: STL elimination - Suggestions Date: Sun, 6 Jun 2004 09:38:56 +0600 Message-ID: <000001c44b77$cff0e940$cf5c5ecb@SusanthaNB> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0001_01C44BAA.1A8E6680" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <1140.220.247.252.202.1086260329.squirrel@220.247.252.202> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C44BAA.1A8E6680 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Lahiru, I had a look at the code and did some testing. Found that it has the required functionality of stl::string that's great!. Kenneth Chiu has already pointed out the problems and improvements to be done. I used purify and found the memory leaks. I have attached the Purify output file that shows the memory leaks. I hope this helps --- Susantha > -----Original Message----- > From: lahiru@opensource.lk [mailto:lahiru@opensource.lk] > Sent: Thursday, June 03, 2004 4:59 PM > To: Apache AXIS C Developers List > Subject: RE: STL elimination - Suggestions > > hi all, > > Please have a look at the Astring class implemented below and provide > your comments. The files are attached with this mail. > > rgds, > Lahiru > > > At 10:13 AM 5/6/2004 +0530, you wrote: > >>What I would suggest - > >>1. expose a small set of classes and make the interface stl-free > >>2. in your internal classes you can still use stl > >> > >>Why do you want to remove stl all-together? > >> > >> > -----Original Message----- > >> > From: Kenneth Chiu [mailto:chiuk@cs.indiana.edu] > >> > Sent: Thursday, May 06, 2004 9:41 AM > >> > To: Apache AXIS C Developers List > > ------=_NextPart_000_0001_01C44BAA.1A8E6680 Content-Type: text/plain; name="AstringMemoryLeaks.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="AstringMemoryLeaks.txt" [I] Starting Purify'd Astring.exe at 06/05/2004 23:43:48 [I] Starting main [I] Summary of all memory in use... {6489 bytes, 54 blocks} [W] Summary of all memory leaks... {172 bytes, 43 blocks} [W] MLK: Memory leak of 124 bytes from 31 blocks allocated in = Astring::substr(int,int)const [Astring.exe] Distribution of leaked blocks Allocation location new(UINT) [new.cpp:23] Astring::substr(int,int)const [astring.cpp:133] } =20 pcSubstring[ilastpos-iPos+1]=3D'\0'; =3D> Astring * as =3D new Astring(pcSubstring); delete pcSubstring; return *as; =20 Astring::find(char const*,int)const [astring.cpp:251] =20 for(int i=3Distart; i Astring Astrtext=3Dsubstr(i,iLenrAstrRight); if (Astrtext=3D=3DccpFind) { return i; main [main.cpp:194] cout<<"------------------"< cout< Astring * as =3D new Astring(pcSubstring); delete pcSubstring; return *as; =20 Astring::find(Astring&,int)const [astring.cpp:232] =20 for(int i=3Distart; i Astring Astrtext=3Dsubstr(i,iLenrAstrRight); if (Astrtext=3D=3DrAstrRight) { return i; main [main.cpp:172] mainCRTStartup [crt0.c:206] [W] MLK: Memory leak of 4 bytes from 1 block allocated in = Astring::substr(int,int)const [Astring.exe] Distribution of leaked blocks Allocation location new(UINT) [new.cpp:23] Astring::substr(int,int)const [astring.cpp:133] } =20 pcSubstring[ilastpos-iPos+1]=3D'\0'; =3D> Astring * as =3D new Astring(pcSubstring); delete pcSubstring; return *as; =20 main [main.cpp:92] mainCRTStartup [crt0.c:206] [W] MLK: Memory leak of 4 bytes from 1 block allocated in = +(Astring&,char const*) [Astring.exe] [W] MLK: Memory leak of 4 bytes from 1 block allocated in +(char = *,Astring const&) [Astring.exe] [W] MLK: Memory leak of 4 bytes from 1 block allocated in = Astring::substr(int,int)const [Astring.exe] [W] MLK: Memory leak of 4 bytes from 1 block allocated in = Astring::substr(int,int)const [Astring.exe] [W] MLK: Memory leak of 4 bytes from 1 block allocated in = Astring::substr(int,int)const [Astring.exe] [W] MLK: Memory leak of 4 bytes from 1 block allocated in = +(Astring&,Astring&) [Astring.exe] [I] Exiting with code 0 (0x00000000) [I] Program terminated at 06/05/2004 23:43:50 ------=_NextPart_000_0001_01C44BAA.1A8E6680--