Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!usenet From: mcg@violet.berkeley.edu (Michael C. Greenspon) Newsgroups: comp.lang.c++ Subject: Probs with explicit virtual destructor call Keywords: virtual,destructor Message-ID: <1991Mar8.001925.4833@agate.berkeley.edu> Date: 8 Mar 91 00:19:25 GMT Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: University of California, Berkeley Lines: 17 I have a list class that needs to explicitly call destructors for the objects it stores when they are removed. Unfortunately, I can't seem to get MPW C++ (Cfront 2.0-based) to buy the unqualified call. Qualifying the call results in a static call when in fact I need a virtual call in case the objects are subclassed. That is: Obj* x; x->Obj::~Obj; // compiles as a static call Obj* y; y->~Obj; // syntax error E&S has examples of the latter as generating the virtual call, which is what I need. Is this AT&T or Apple brain-damage (wouldn't be the first time) or am I missing something (same)? Responses via netmail appreciated. --Michael mcg@violet.berkeley.edu ucbvax!violet!mcg