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 X-Google-Thread: 103376,de1c23707584fc3c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-22 13:05:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: virtual destructors Date: 22 Apr 2003 15:57:11 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1051042319 5678 128.183.235.92 (22 Apr 2003 20:11:59 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 22 Apr 2003 20:11:59 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:36366 Date: 2003-04-22T20:11:59+00:00 List-Id: Simon Wright writes: > Stephen Leake writes: > > > You also need to ensure that both access types use the same storage > > pool. Something like: > > > > for CDerived'Storage_Pool use CBase'Storage_Pool. > > I don't see why? there was no attempt I could see to convert between > the classwide pointer types? In general, the compiler can use different storage pools for each access type. If you do: A : CBase := new Derived'(); and then later: Free (A); The compiler might allocation from CDerived_Storage_Pool, and then deallocate from CBase_Storage_Pool. Very bad. -- -- Stephe