From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,26639dcc06d45917 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-20 13:17:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!cyclone1.gnilink.net!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp2.aus1.giganews.com!nntp.giganews.com!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail From: "Eric G. Miller" Subject: Re: Array of unbounded strings, memory leakage? User-Agent: Pan/0.13.0 (The whole remains beautiful (Debian GNU/Linux)) Message-ID: Newsgroups: comp.lang.ada References: <3DB2FF06.8060308@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 20 Oct 2002 20:16:21 GMT NNTP-Posting-Host: 216.119.15.146 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1035144981 216.119.15.146 (Sun, 20 Oct 2002 13:16:21 PDT) NNTP-Posting-Date: Sun, 20 Oct 2002 13:16:21 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:29967 Date: 2002-10-20T20:16:21+00:00 List-Id: In <3DB2FF06.8060308@acm.org>, Jeffrey Carter wrote: > This shouldn't leak memory. If it does, there's a problem with your > compiler's implementation of Unbounded_String. Thanks for the info. It's what I thought, but wasn't sure... > Note that the loop to initialize the new elements could use an aggregate: > > Tmp (Old_Size + 1 .. Size) := (others => Null_Unbounded_String); Doh! > However, since an uninitialized Unbounded_String has the default value > of Null_Unbounded_String, this isn't necessary. Also wasn't sure of that either (haven't used Unbounded Strings much)...