hmm... I added the virtual both in the base classes and the subclasses for clarity reasons (you don't have to follow the whole hierarchy to see what is virtual) but ok, I'll remove them.
About the shared pointer now, I think if the shared pointer points to the base class we will have problem (because the destructor that will be called is chosen at compile time for the virtual functions) but if it points to the subclass we are fine.
hmm... I added the virtual both in the base classes and the subclasses for clarity reasons (you don't have to follow the whole hierarchy to see what is virtual) but ok, I'll remove them.
About the shared pointer now, I think if the shared pointer points to the base class we will have problem (because the destructor that will be called is chosen at compile time for the virtual functions) but if it points to the subclass we are fine.
lol @tab :-D