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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bb7708f0d606e785 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!y19g2000yqy.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Yannick_Duch=EAne_Hibou57?= Newsgroups: comp.lang.ada Subject: Re: Deallocation of Unbounded_String Date: Sat, 25 Jul 2009 10:18:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 77.198.58.193 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1248542326 11972 127.0.0.1 (25 Jul 2009 17:18:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 25 Jul 2009 17:18:46 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y19g2000yqy.googlegroups.com; posting-host=77.198.58.193; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:6377 Date: 2009-07-25T10:18:46-07:00 List-Id: Hello, At least, the GNAT private part for this package specification, shows that it is derived from Ada.Finalization.Controlled The ARM A.4.5, states that the pragma Preelaborable_Initialization is applied to this type. I do not know the pragma Preelaborable_Initialization, but I guess it has something to deal with the latter. Whenever resource management is required, if possible, it is a good idea to use either Ada.Finalization.Controlled or Ada.Finalization.Limited_Controlled, so we may guess this good idea is extensively used in such packages. Any way, at leat with GNAT, I can assert you that it is done automatically : you do not have to bother when you create an Unbounded_String, when you copy one into another or when you leave a scope containing such an object, as it is properly handled like it is with any types derived from Ada.Finalization.Controlled. Now and next, just have to check about the pragma Preelaborable_Initialization, to see what it means exactly