comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne Hibou57" <yannick_duchene@yahoo.fr>
Subject: Re: Deallocation of Unbounded_String
Date: Sat, 25 Jul 2009 10:18:46 -0700 (PDT)
Date: 2009-07-25T10:18:46-07:00	[thread overview]
Message-ID: <efbb80b9-db94-4e55-bede-f53083462f8d@y19g2000yqy.googlegroups.com> (raw)
In-Reply-To: b3e58bec-89fe-4f8a-a4d8-470d618a3c65@b14g2000yqd.googlegroups.com

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



  parent reply	other threads:[~2009-07-25 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-25 16:37 Deallocation of Unbounded_String vlc
2009-07-25 17:09 ` sjw
2009-07-25 17:16   ` vlc
2009-07-25 17:18 ` Yannick Duchêne Hibou57 [this message]
2009-07-25 19:17 ` Jeffrey R. Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox