
David Walthall wrote:
Overall, it seems like using a shared_ptr for stack objects is misleading, and as a result, may eventually lead to difficult to trace bugs. Unless allocating and deallocating the object is a bottleneck in your code, the potential costs outweigh the benefits.
Yes, this was my general conclusion (i.e., I didn't actually do it!) For freshly written code, I could not think of a case where I would suggest a null deleter but that doesn't mean that there isn't one. I think before adding a null deleter to Boost, it might be useful to think about the cases in which it is necessary and whether they occur enough to encourage its use. After all, if it is in Boost, chances are that it is a proper way to do things. -- Sohail Somani http://uint32t.blogspot.com