28 Jul
2010
28 Jul
'10
1:33 p.m.
If I can pass the object by reference to a function, then is there a need to use shared pointers?
Not if you know the lifetime of your object and it won't be deleted before the function has finished. You may find scoped pointers useful though: http://www.boost.org/doc/libs/1_43_0/libs/smart_ptr/scoped_ptr.htm