comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: non-library level finalization
Date: 21 Mar 2005 10:54:27 -0500
Date: 2005-03-21T10:54:27-05:00	[thread overview]
Message-ID: <wcchdj5f0zw.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: eIKdnT-oNJ6gvqPfRVn-pA@comcast.com

tmoran@acm.org writes:

> I have a generic package that would benefit from doing some cleanup when
> an instantiation disappears.  It can't just declare a (private)
> Finalization_Controlled object because that would require all
> instantiations to be at library level.  Suggestions?

If you can arrange to declare the controlled type outside the generic,
you can still declare the object inside the generic.  But if the cleanup
code needs to work with the generic formal parameters, that won't work.

Probably your best bet is to live with the library-level restriction.
You can still *use* instances from nested places.

- Bob



  parent reply	other threads:[~2005-03-21 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21  1:28 non-library level finalization tmoran
2005-03-21  9:01 ` Martin Dowie
2005-03-21 13:09   ` Ada2005 again, was: " Tapio Kelloniemi
2005-03-21 14:59     ` Martin Dowie
2005-03-21 21:48       ` Randy Brukardt
2005-03-21 15:54 ` Robert A Duff [this message]
2005-03-21 21:42 ` Randy Brukardt
2005-03-21 21:54 ` Randy Brukardt
2005-03-21 22:37   ` tmoran
replies disabled

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