Retro68/gcc/libvtv/testsuite/libvtv.cc/derived-lib.cpp

19 lines
260 B
C++
Raw Normal View History

2014-09-21 17:33:12 +00:00
#include "lib.h"
struct Derived_Private : public Base
{
virtual ~Derived_Private()
{ printf("in Derived_Private destructor\n"); }
};
Base * GetPrivate()
{
return new Derived_Private();
}
void Destroy(Base * pb)
{
delete pb; // Virtual call #1
}