With shared_ptr included in c++11, one could achieve a semi garbage-collected enviroment. Does the (inflationary?) usage come along with some disadvantages?
I could imag
I performance is important I wold not use std::sahred_ptr. For example, to sort an array may with real pointers is 5 times faster than to sort with shared pointers.
On the other hand shared pointer do not avoid all troubles with garbage leaks in case of circular references. Of course, this can be solved with weak_ptr, but what I mean is, that shared pointer need also be handled carfully.
I prefer to use shared_ptr for static elements, because static elements are not deleted by a destructor of a class.