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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.151.76 with SMTP id z73mr25919768iod.70.1517513825411; Thu, 01 Feb 2018 11:37:05 -0800 (PST) X-Received: by 10.157.76.145 with SMTP id m17mr736522otf.11.1517513825341; Thu, 01 Feb 2018 11:37:05 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no337243ita.0!news-out.google.com!s63ni604itb.0!nntp.google.com!g80no337154itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 1 Feb 2018 11:37:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=80.114.173.191; posting-account=BtkjvAoAAADwEquGb07eykXfyiDMOxfl NNTP-Posting-Host: 80.114.173.191 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2a706673-45d2-4cfa-805f-4a7d0086f721@googlegroups.com> Subject: Re: Reference counter in smart pointers are not updated properly when used by multiple tasks From: onox Injection-Date: Thu, 01 Feb 2018 19:37:05 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 3669527468 X-Received-Bytes: 1868 Xref: reader02.eternal-september.org comp.lang.ada:50261 Date: 2018-02-01T11:37:04-08:00 List-Id: On Thursday, February 1, 2018 at 3:48:10 PM UTC+1, Jeffrey R. Carter wrote: > Set's parameter Free is an anonymous access-to-subprogram parameter; one is not > supposed to be able to assign those and call them later, but that is exactly > what this code does. Is this code legal? GNAT compiles it fine. If it is legal, > should it be? I hope so. When I instantiate the Orka.Smart_Pointers package, I do not know how to free the Object_Type (access to an interface). Only when I call Set I know how to free the object (access to a tagged type implementing the interface).