However, now your class has a vtable and can no longer be used in situations
where you don't have globals, so beware!
Kevin
> -----Original Message-----
> From: Scott Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 23, 1999 12:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: destructors
>
>
> Brian Hall wrote:
> > The problem is that if you create a subclass, but then call delete
> > when the type is the superclass, the base class destructor gets
> > called, not the destructor of the actual object.
>
> You need to declare the destructor as virtual in the base class. Then
> the correct destructor will be called in this case.
>
> This has nothing to do with Palm or Metrowerks. This is a
> basic generic
> C++ programming problem.
>
> -slj-
>