I am making extensive use of boost:shared_ptr in my code. In fact, most of the objects that are allocated on the heap are held by a shared_ptr. Unf
boost:shared_ptr
shared_ptr
Are you really making more shared copies of pFoo inside bar? If you aren't doing anything crazy inside, just do this:
void bar(Foo &foo) { // ... }