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,7a180be12347b9d3 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,7a180be12347b9d3 X-Google-Attributes: gid1108a1,public X-Google-ArrivalTime: 2002-02-20 21:49:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!jfk3-feed1.news.digex.net!dca6-feed2.news.digex.net!intermedia!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc01.gnilink.net.POSTED!53ab2750!not-for-mail Message-ID: <3C748B15.7080005@mail.com> From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.8+) Gecko/20020218 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.object Subject: Re: Merits of re-dispatching References: <3c70b935.501062@News.CIS.DFN.DE> <3c721028.221281@News.CIS.DFN.DE> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 21 Feb 2002 05:49:10 GMT NNTP-Posting-Host: 162.83.249.233 X-Complaints-To: business-support@verizon.com X-Trace: nwrddc01.gnilink.net 1014270550 162.83.249.233 (Thu, 21 Feb 2002 00:49:10 EST) NNTP-Posting-Date: Thu, 21 Feb 2002 00:49:10 EST Xref: archiver1.google.com comp.lang.ada:20196 comp.object:34792 Date: 2002-02-21T05:49:10+00:00 List-Id: Dmitry A. Kazakov wrote: > My interpretation was that if C++ dispatches then it treats the type > as class wide,, otherwise as specific. Then the object is always > treated as specific in all calls from destructor. So what? Maybe it is > hard to simulate, but well possible to explain. I don't know what it is you think that C++ does, but in fact, all calls to virtual methods in C++ are dispatching, unless you ask for a specifc version using the pointer->CLASS::FUNCTION() notation. In constructors and destructors, the type of the object is the type whose constructor or destructor is running, and that is the type used for dispatching. If the compiler can deduce the actual type of an object in a dispatching call, it is of course free to call the proper method directly, and it may be the case that such deduction is easier in a constructor or destructor, but that is completely irrelevant to understanding what is happening from the language viewpoint. You may persist in maintaining your incorrect mental model of what is going on, but the only effect will be to lead you astray in complicated caes.