As in when you have a polymorphic base class, but the exact derived class types will only be known at runtime? The solution is to use a smart pointer of the base class type then.