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,5dacec64c8c879fa X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.68 with SMTP id nq4mr3161054pbc.2.1328859332821; Thu, 09 Feb 2012 23:35:32 -0800 (PST) Path: wr5ni7816pbc.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Preventing Unchecked_Deallocation? Date: Fri, 10 Feb 2012 07:35:32 +0000 Organization: A noiseless patient Spider Message-ID: References: <33a35da4-6c3e-4ab4-b58f-a9d73565d79a@t30g2000vbx.googlegroups.com> <4350713b-6ac3-4b22-b221-8da2bac52fea@t5g2000yqk.googlegroups.com> <26e4f2a4-edae-4e37-8697-f2390e636a21@z31g2000vbt.googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="12439"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19T5N2LJWAMBhbrTpYHnyqggC6ZpBN6VSk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:YFSdJzRgF8t8s4hbd+MEBzhkpbI= sha1:JnevVS+8Ig+HNfEeDbfhBIsCmY0= Content-Type: text/plain; charset=us-ascii Date: 2012-02-10T07:35:32+00:00 List-Id: "Randy Brukardt" writes: > "Simon Wright" wrote in message > news:m2lioc4fu9.fsf@pushface.org... >> "Randy Brukardt" writes: >> >>> If you don't need (visible) dereferences at all, you should >>> definitely use a handle type like the Cursor type of Ada >>> Containers. Indeed, I think that the vast majority of the time, you >>> should simply use the Cursor type directly (putting the objects into >>> appropriate instances of the containers). There you don't have any >>> visible access types (and any existence of them is easily detected >>> with tools, see below). >> >> If you mean that the link from object A to object B should be a >> Cursor to the Container with the B's in it, will that Cursor retain >> its validity if I update the B Container? (by, say, adding another >> B). > > Yes, of course, that's required by the definition of cursors (for > instance, see A.18.3(2/2) for the linked list container). Excellent, thanks.