From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Differences in finalization of controlled objects between gcc 4.6 and gcc 4.7
Date: Thu, 19 Jul 2012 15:45:30 +0200
Date: 2012-07-19T15:45:31+02:00 [thread overview]
Message-ID: <50080f7b$0$9525$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <ju8u7t$kh9$1@speranza.aioe.org>
On 19.07.12 14:23, Markus Schï¿œpflin wrote:
> Is there a way to have the objects created in place directly in the array?
Can you make the type limited?
(And of so, then T could also be self-initializing:
type T is new ADA.FINALIZATION.LIMITED_CONTROLLED with
record
SELF : T_PTR := INIT_T (T'Unchecked_Access);
ITEM : INTEGER;
end record;
(...
function INIT_T (X : T_PTR) return T_PTR is
begin
TEXT_IO.PUT_LINE (SYSTEM.ADDRESS_IMAGE (X'Address) & ": <");
X.ITEM := 123;
return X;
end INIT_T;
...)
next prev parent reply other threads:[~2012-07-26 15:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 12:23 Differences in finalization of controlled objects between gcc 4.6 and gcc 4.7 Markus Schöpflin
2012-07-19 13:45 ` Georg Bauhaus [this message]
2012-07-19 13:59 ` Markus Schöpflin
2012-07-19 14:48 ` Georg Bauhaus
2012-07-20 2:56 ` Randy Brukardt
2012-07-20 2:59 ` Randy Brukardt
2012-07-27 7:02 ` Markus Schöpflin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox