The frequent situation for a base class is always that it’s meant to have publicly derived classes, and so calling code is nearly sure to use a little something like a shared_ptr: these functions should really accept a smart pointer provided that they have to participate in the widget’s lifetime http://paxtonppzjl.digiblogbox.com/25331431/do-my-rstudio-homework-an-overview