Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!hydroesm!jtsv16!geac!alias!earth!rae From: rae@gpu.utcs.toronto.edu (Reid Ellis) Newsgroups: comp.lang.c++ Subject: Re: Deleting derived classes Message-ID: Date: 14 Nov 90 04:13:51 GMT References: <1000@zinn.MV.COM> Sender: Reid Ellis Reply-To: Reid Ellis Organization: Alias Research, Inc. Toronto ON Canada Lines: 21 Matthew Donaldson writes: > if a delete function > is declared in the derived class, it will be used, and the one defined in > the base class will be ignored. Is this part of the language definition, > or a bug in the compiler? As previously stated, it is part of the language definition, but note that this can be circumvented by declaring the destructor as virtual.. struct foo { foo(); virtual ~foo(); }; Now you are assured that the destructors will be called properly. Reid -- Reid Ellis 264 Broadway Avenue, Toronto ON, M4P 1V9 Canada rae@gpu.utcs.toronto.edu || rae%alias@csri.toronto.edu || +1 416 487 1383