comp.lang.ada
 help / color / mirror / Atom feed
* Finalization and Declare blocks.
@ 2002-12-21  8:51 Stapler
  2002-12-21 15:13 ` James S. Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Stapler @ 2002-12-21  8:51 UTC (permalink / raw)


I'm currently a little fuzzy on how Ada compilers handle allocation and
de-allocation.

If I declare an Abstract Data Type(a limited record for example) in the
private part of a package, with a generic Item as one of it's elements,
and then I "with" that package in another package, can I instantiate the
data type without using "new" and also assume that the the Data Type will
be automatically de-allocated at the end of the declare block?

Or, within the declaration part of the declare block, could I derive the
Abstract Data Type from Ada.Finalization.Controlled and assume the
same?(That it will be automatically de-allocated at the end of the
declare block.)

I've been getting mixed messages, so I'm assuming it depends on who's
compiler I'm using.

Any pointers would be appreciated.

Stapler



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

end of thread, other threads:[~2002-12-21 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-21  8:51 Finalization and Declare blocks Stapler
2002-12-21 15:13 ` James S. Rogers

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