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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,37d1760a19f7ae57 X-Google-Attributes: gid103376,public From: stt@blackstone.camb.inmet.com (Tucker Taft) Subject: Re: Q. on Automatic Package Finalization Date: 1996/09/24 Message-ID: #1/1 X-Deja-AN: 185105978 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: blackstone.camb.inmet.com references: <324837B8.2361@watson.ibm.com> organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-09-24T00:00:00+00:00 List-Id: Norman H. Cohen (ncohen@watson.ibm.com) wrote: : ... : David Gibson's problem was frame finalization not for a procedure, but : for a generic package. He ran into a similar restriction, against : extending a library-level type in a generic body (RM 3.9.1(4)). His : solution is to declare his controlled type at library level. Instead of : declaring a dummy controlled type with no components, he gives the type : one record component for each of the local variables that the : finalization routine is to manipulate. The finalization routine is : rewritten to manipulate the corresponding components of the object being : passed to it. The local variables to be finalized are replaced by a : single object of the new controlled type. ... Another approach would be to use access discriminants rather than components. The local variables of interest would need to be aliased, so they could be referenced by the access discriminants of the controlled object. : ... : Norman H. Cohen : mailto:ncohen@watson.ibm.com : http://www.research.ibm.com/people/n/ncohen -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA