Boost logo

Boost Users :

From: Sean Kelly (sean.kelly_at_[hidden])
Date: 2005-06-10 10:26:52

Dear All,

is there any reason to prefer (i.e is it safer)
to prefer

some_utility(boost::shared_ptr<Foo> ptr)


some_utility(boost::shared_ptr<Foo>& ptr)

or even

some_utility(Foo& ref) (shared ptr is derefed and passed in)

The latter avoiding obviously avoids the increment/decrement
of the ref_count.



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at