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-Thread: 103376,4dfbb9c23c9a83eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Follow up 2: raised STORAGE_ERROR : helper.adb:386 object too large Date: 10 Aug 2005 13:44:17 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <27c5ecc06ac6a213466ab65361d20376@localhost.talkaboutprogramming.com> <4486c49961e0e8ce8904b267fcc860b5@localhost.talkaboutprogramming.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1123695857 26862 192.74.137.71 (10 Aug 2005 17:44:17 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 10 Aug 2005 17:44:17 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4068 Date: 2005-08-10T13:44:17-04:00 List-Id: Jeff Creem writes: > .. code that is getting N > > begin > Region_Data := new String(1 .. N); > Fill_In_Data_Into_Region_Data > > Call_Existing_Code_THat_Wants_String(Region_Data.all); > > Free(Region_Data); > > exceptioon > when others => > Free(Region_Data); > raise; > end; If the Call_Existing_Code_THat_Wants_String part can be aborted, then you should wrap the memory management in a controlled type, so an abort won't cause a storage leak. - Bob