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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Issue with GNAT GPL 2009 and GtkAda References: <4A414EBB.8060204@free.fr> <1avd65rn49abv$.krcxo2gdzb16$.dlg@40tude.net> <7ajfrgF1vdsnlU1@mid.individual.net> <1pjr0mljv2ozo$.1ahm9u9i39pg6.dlg@40tude.net> From: Stephen Leake Date: Sat, 27 Jun 2009 05:53:12 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:EAoczD62L/oU//a5l2pgNzQYx3o= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 410ca4a45ec0be9cadf9d22433 Xref: g2news2.google.com comp.lang.ada:6659 Date: 2009-06-27T05:53:12-04:00 List-Id: "Dmitry A. Kazakov" writes: > Here is a test: > > with Ada.Finalization; > with Ada.Text_IO; use Ada.Text_IO; > > procedure Test_Anonymous_Access is > package P is > type T is new Ada.Finalization.Controlled with null record; > overriding procedure Finalize (X : in out T); > end P; > package body P is > procedure Finalize (X : in out T) is > begin > Put_Line ("Finalized"); > end Finalize; > end P; > use P; > begin > declare > X : access T := new T; > begin > Put_Line ("Created"); > end; > Put_Line ("Left the scope"); > end Test_Anonymous_Access; > > It should print: > > Created > Finalized > Left the scope GNAT 6.2.1 on Windows does this. -- -- Stephe