[K42-discussion] virtual destructors
Donour Sizemore
donour at cs.unm.edu
Fri Jul 7 06:15:31 EST 2006
C++ requires that classes with virtual methods define a virtual
destructor. Older versions of gcc allow you to get away without it, but
gcc4 enforces it. I'm having trouble adding a destructor to the
VAllocServices class. I want to declare a destructor like this:
VAllocServices{
public:
...
~VAllocServices() = 0;
}
I've read several places that even with a pure virtual destructor, you
need to define a body for it. Such as:
VAllocServices::~VAllocServices() {}
When compiling the above example, a strange symbol is being referenced
(_ZdlPv) but isn't defined and I can't figure out what it is or where it
comes from. It doesn't appear to be a mangled version of anything I
recognize. Does anybody have an idea what could be happening here?
thanks
donour
More information about the K42-discussion
mailing list