comp.lang.ada
 help / color / mirror / Atom feed
* Question about finalization of local object returned from the function
@ 2019-08-28 22:36 darkestkhan
  2019-08-29  1:45 ` Brad Moore
  0 siblings, 1 reply; 5+ messages in thread
From: darkestkhan @ 2019-08-28 22:36 UTC (permalink / raw)


Given a function returning controlled type:

function Bar return T is
  Foo : T;
begin
  ...
  return Foo;
end Bar;

would Foo be finalized upon end of the function?

As far as I can understand from the standard - yes, Foo would get finalized. Also if Foo was just a normal record type with controlled components those components would be finalized as well.

But I am not fully confident that my understanding of this is correct...

Thanks,
darkestkhan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-02 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 22:36 Question about finalization of local object returned from the function darkestkhan
2019-08-29  1:45 ` Brad Moore
2019-09-01 18:34   ` Stephen Leake
2019-09-01 22:12     ` darkestkhan
2019-09-02 17:14       ` Jeffrey R. Carter

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