From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-12-20 07:18:44


From: "Joe Gottman" <joegottman_at_[hidden]>

> I think the scoped_ptr class should have a release() function, similar
> to the one in std::auto_ptr. This would help in cases like the following
>
> int *foo() {
> shared_ptr<int> the_pointer(new int());
> //Do stuff that might throw
> return the_pointer.release();
> }

I'm not necessarily against this proposal, but wanted to point out that the
motivating example doesn't hold water. You return a plain pointer,
indicating a C-style API, while at the same time worry about exception
safety.

--
Peter Dimov
Multi Media Ltd.