comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Questions on Storage Pools
Date: Tue, 13 Aug 2013 16:02:09 -0500
Date: 2013-08-13T16:02:09-05:00	[thread overview]
Message-ID: <kue6sh$4nh$1@loke.gir.dk> (raw)
In-Reply-To: b59a8382-d34e-47d6-8c29-290b1683ac3b@googlegroups.com

"Adam Beneschan" <adambeneschan@aol.com> wrote in message 
news:b59a8382-d34e-47d6-8c29-290b1683ac3b@googlegroups.com...
On Tuesday, August 13, 2013 12:36:08 PM UTC-7, AdaMagica wrote:
...
>> If there is Storage_Size, the storage will be freed. If there is none, 
>> the storage
>> remains allocated (with finalized objects inside). Correct?
>
>I believe this is correct, although off the top of my head I think that if 
>there's no
>Storage_Size clause, the implementation is still allowed to deallocate the 
>storage if it chooses.
>
>But yes, when the end of the block is reached, the three 
>not-yet-deallocated objects should
>be finalized.  In fact, if you remove the Free call, then when the end of 
>the block is reached,
>all four objects should have Finalized called on them, even though one of 
>those objects now
>has nothing pointing to it.
>
>At least I think this is still correct.  Some relevant paragraphs got 
>changed in Ada 2012.
> I don't think they affect your example, but I'm planning to look more 
> carefully.

The reason that the wording changed was that anonymous access types were 
poorly specified if the designated object was finalizable. We needed to say 
where that finalization would happen. There was no intent to change any 
behavior of named access types, and I believe that your explanation is 
correct.

                                            Randy.




  reply	other threads:[~2013-08-13 21:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-10 21:45 Questions on Storage Pools AdaMagica
2013-08-12 17:14 ` Adam Beneschan
2013-08-13 19:36   ` AdaMagica
2013-08-13 20:21     ` Adam Beneschan
2013-08-13 21:02       ` Randy Brukardt [this message]
2013-08-14  7:40         ` AdaMagica
replies disabled

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