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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,147f221051e5a63d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!a23g2000hsc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: memory management in Ada: tedious without GC? Date: Mon, 19 May 2008 14:13:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: <279aec2d-9279-4da5-91f0-a531ee890325@a23g2000hsc.googlegroups.com> References: <4ddef8bf-b5b1-4d7e-b75b-386cd6c8402c@l17g2000pri.googlegroups.com> <9f2c2db4-d6c1-4cdf-884c-5cbc26ac7701@d1g2000hsg.googlegroups.com> <5184e351-1971-484c-a74b-16156544ec00@x41g2000hsb.googlegroups.com> NNTP-Posting-Host: 85.3.224.28 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1211231586 30875 127.0.0.1 (19 May 2008 21:13:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 19 May 2008 21:13:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a23g2000hsc.googlegroups.com; posting-host=85.3.224.28; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:258 Date: 2008-05-19T14:13:06-07:00 List-Id: On 19 Maj, 17:11, Matthew Heaney wrote: > > How would you use this strategy to make a controlled stream (derived > > from Root_Stream_Type)? > > package P is > type T is new Root_Stream_Type with private; > procedure Op (O : not null access T); -- or whatever > private > type Control_Type (O : not null access T) is > new Limited_Controlled with null record; > > -- override Init and Final as req'd > > type T is new Root_Stream_Type with record > Control : Control_Type (T'Access); > -- other components as req'd > end record; > end P; Interesting idiom. Thanks! -- Maciej Sobczak * www.msobczak.com * www.inspirel.com