Boost logo

Boost Users :

From: Phillip Hellewell (sshock_at_[hidden])
Date: 2006-10-01 21:19:41


Maybe I'm missing something, but how much do you really save by passing a
shared pointer by reference? Isn't passing a shared pointer by reference
kind of dangerous? Can you _always_ be guaranteed that it will work ok and
the ref count won't go to zero and cause the object to be destroyed?

I've always followed the guideline of passing shared pointers by value.
Copying a shared pointer is extremely fast, or am I missing something?

Phillip Hellewell



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net