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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5653f0bd43045b85 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: garbage collection Date: 1999/08/19 Message-ID: <37BC2203.328E6338@averstar.com>#1/1 X-Deja-AN: 514719176 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <7pe93j$ehg$1@dailyplanet.wam.umd.edu> <1ZCu3.301$26.56649@typhoon-sf.snfc21.pbi.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-08-19T00:00:00+00:00 List-Id: Keith Thompson wrote: > > tmoran@bix.com writes: > > > If an implementation doesn't provide garbage collection then that > > > storage is forever lost, is that correct? > > > > No. When the access type goes out of scope there is clearly no way > > the storage can be on the target end of a pointer, so the > > implementation should free that storage. > > Just to clarify, most implementations don't actually do this. Thus, > under most Ada implementations, storage *will* be "forever lost" if > you allocate it and don't explicitly deallocate it. (Well, "forever" > usually means "until the program terminates".) In Ada 95, implementations are required to reclaim the storage associated with an access type if the 'Storage_Size attribute is specified (which Tom also mentioned, by the way). If no 'Storage_Size is specified, then you are correct that most Ada 95 compilers don't reclaim the storage automatically when leaving the scope of the access type. > -- > Keith Thompson (The_Other_Keith) kst@cts.com > San Diego Supercomputer Center <*> > One of the great tragedies of ancient history is that Helen of Troy > lived before the invention of the champagne bottle. -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA