C++ dependency injection - by reference or by boost::shared_ptr?

In cases where constructor dependency injection is required, what are the considerations for using injection by reference vs. using boost::shared_ptr?

Is there another common way of doing it? How does it compare to the two methods above?

8
задан Jonathan 20 April 2011 в 15:31
поделиться