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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,de1c23707584fc3c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-22 08:45:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail From: "kat-Zygfryd" <6667@wp.pl> Newsgroups: comp.lang.ada Subject: Re: virtual destructors Date: Tue, 22 Apr 2003 17:45:26 +0200 Organization: news.onet.pl Sender: samael_@op.pl@pc238.konin.cvx.ppp.tpnet.pl Message-ID: References: NNTP-Posting-Host: pc238.konin.cvx.ppp.tpnet.pl X-Trace: news.onet.pl 1051026333 16808 217.99.114.238 (22 Apr 2003 15:45:33 GMT) X-Complaints-To: abuse@onet.pl NNTP-Posting-Date: 22 Apr 2003 15:45:33 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:36347 Date: 2003-04-22T15:45:33+00:00 List-Id: Never mind, I didn;t thinf of directly declaring procedure Free is new Ada.Unchecked_Deallocation(Base'Class,CBase); procedure Free is new Ada.Unchecked_Deallocation(Derived'Class,CDerived); Another question: are there any advantages in using Ada.Finalization for objects that will always be dynamically allocated/deallocated over simply declaring a Dispose procedure, with frees object's components before freeing itself? Zygfryd