From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,589d16556c145528 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: non-library level finalization Date: 21 Mar 2005 10:54:27 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1111420467 7937 192.74.137.71 (21 Mar 2005 15:54:27 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 21 Mar 2005 15:54:27 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:9677 Date: 2005-03-21T10:54:27-05:00 List-Id: 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