From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-04-07 10:52:42
You class is basically an auto_ptr with parametrised release function.
Looking at this level, I would much prefer to wait for our
scoped_ptr's and shared_ptr's to get the parametrised release
function. There has been some talk about this, so I don't think it
should be too long.
But there are two interesting points you classes bring.
- The smart pointer does not store a pointer but the actual instance.
This is an interesting special case usage of smart pointers. I would
actually be tempted to generalize your class into something like
auto_value, so it is not limited to resources.
- Second feature is also interesting, parametrised NULL value. Great
Have you considered making shared_res?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk