I would like to pass pointers to d
around from one container to a next. At no point will there be more than one owner of the pointer (or d
itself). I'd like that when the last pointer goes out of scope, delete d
automatically called.
In C++11, I'd do this with unique_ptr. But, alas, I can't use C++11. What is the best equivalent in C++? Boost is fine. Or, if there is none, what is the appropriate way to handle this?