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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.143.5 with SMTP id sa5mr284308obb.31.1459992527198; Wed, 06 Apr 2016 18:28:47 -0700 (PDT) X-Received: by 10.182.120.71 with SMTP id la7mr980obb.1.1459992527120; Wed, 06 Apr 2016 18:28:47 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!nt3no8472363igb.0!news-out.google.com!u9ni677igk.0!nntp.google.com!nt3no8472359igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 6 Apr 2016 18:28:46 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=37.190.52.61; posting-account=YB4WOgoAAABLG9D7qoJiPBc6EJSzsPDF NNTP-Posting-Host: 37.190.52.61 References: <05bc57c3-9811-4248-935c-b86156298a90@googlegroups.com> <61dd12e1-4450-4c6e-b8b5-7cf1c075ebad@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada 2005,Doubly_Linked_List with Controlled parameter From: George J Injection-Date: Thu, 07 Apr 2016 01:28:47 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:30029 Date: 2016-04-06T18:28:46-07:00 List-Id: > Note that you can write something like your original code, but it has to use > reference counts and an overriding of Adjust in order to manage the access > value properly (since the container copies the objects, and thus you have to > support that). I think Christoph Grein's safe pointers give an example of > how that could be done. > > In this case, the various alternatives suggested are better, since the > compiler/runtime is doing that complicated work and you don't have to. But > sometimes you need to manage an object this way, so it's valuable to know > that it is possible. > > Randy. Thanks, Randy! I've found and added Christoph Grein's "Safe pointers" materials to bookmarks to read some later.