shared_ptr magic :)
Mr. Lidström and I had an argument :) Mr. Lidström's claim is that a construct shared_ptr<Base> p(new Derived); doesn't require Base to have a virtual destructor: Armen Tsirunyan : "Really? Will the shared_ptr clean up correctly? Could you please in this case demonstrate how that effect could be implemented?" Daniel Lidström : "The shared_ptr uses its own destructor to delete the Concrete instance. This is known as RAII within the C++ community. My advice is that you learn all you can about RAII. It will make your C++ coding so much easier when you use RAII in all situations." Armen Tsirunyan