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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no 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 nq4mr18366658pbc.2.1328744405130; Wed, 08 Feb 2012 15:40:05 -0800 (PST) Path: wr5ni2873pbc.0!nntp.google.com!news1.google.com!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: Preventing Unchecked_Deallocation? Date: Wed, 08 Feb 2012 18:40:02 -0500 Organization: A noiseless patient Spider Message-ID: References: <33a35da4-6c3e-4ab4-b58f-a9d73565d79a@t30g2000vbx.googlegroups.com> Mime-Version: 1.0 Injection-Date: Wed, 8 Feb 2012 23:40:04 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="TFSzwg9zEWICKE4g7mPu9w"; logging-data="6618"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1h42ja4aQgLL6iUv6gP7A" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Cancel-Lock: sha1:tRp1qoajRl/8syXVR+O8PYRsJ/c= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-02-08T18:40:02-05:00 List-Id: On 02/08/2012 03:49 AM, Maciej Sobczak wrote: > On 7 Lut, 07:26, Jeffrey Carter > wrote: > >> A basic design rule is: the reserved word access must not appear in the visible >> part of a package specification. > > Don't worry. It will appear in the user package, where yours is > withed. > The smart user will define his own access types and will make pointers > from your objects at the nearest opportunity and there's lots of them > if the type in question is, for example, tagged. > >> If you follow this rule, I think your problem >> will disappear. > > This rule will irritate the user, because it will make creating > pointers one line more difficult. ;-) > > -- > Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com I'm not sure I agree with those rules (for all cases), but if the only pointer are user-defined, it would be rather difficult for the user to deallocate items allocated by the library - which I believe was the original problem. (Then again, throw in Unchecked_Conversion and anything can be deallocated, even I : Integer := 0; which makes just as much sense as deallocating someone else's pointer.) -- --- BrianG 000 @[Google's email domain] .com