From: Jeff Carter <jrcarter010@earthlink.net>
Subject: Re: Finalization of package instance
Date: 2000/01/19
Date: 2000-01-19T00:00:00+00:00 [thread overview]
Message-ID: <3884FB44.CFBE17A2@earthlink.net> (raw)
In-Reply-To: 9l4h4.5569$Wn2.114954@newsread2.prod.itd.earthlink.net
Matthew Heaney wrote:
>
> In article <388496B3.7E36F781@earthlink.net> , Jeff Carter
> <jrcarter010@earthlink.net> wrote:
>
> > 3. In the body of Datalink, declare a controlled type and an object of
> > that type; the Finalize for the type does the disconnect.
>
> This is the simplest of your solutions.
I forgot to mention that the solution with the visible type requires
that the Initialize procedure for the type do the connect. Sorry.
>
> > Datalink would
> > be generic, so each instance would have its own controlled object. This
> > can get you into trouble because a compiler may optimize away an unused
> > variable.
>
> I think there's a new rule (I don't know the AI) that says a
> Limited_Controlled object cannot be optimized away.
>
> This issue has come up on CLA before; visit DejaNews to find the thread.
I recall the thread, with the information that an unused controlled type
could be optimized away, but that GNAT doesn't. If there's a new AI
preventing it in general, that's good news.
--
Jeff Carter
"English bed-wetting types."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2000-01-19 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-18 0:00 Finalization of package instance Mario Amado Alves
2000-01-18 0:00 ` Robert A Duff
2000-01-18 0:00 ` Jeff Carter
2000-01-18 0:00 ` Matthew Heaney
2000-01-19 0:00 ` Jeff Carter [this message]
2000-01-19 0:00 ` Statements per function point Herv� BITTEUR
2000-01-19 0:00 ` Ted Dennison
2000-01-19 0:00 ` Ehud Lamm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox