Boost logo

Boost :

From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-03-03 14:10:53

"gavin collings" <gcolling-_at_[hidden]> wrote:
> > If we implemented release() to clear pointers of all related
> > shard_ptr's, that would change semantics of the shared_ptr as a
> > and that is probably not a good idea.
> Well, I think that's essentially what I was talking about. It's true
> that the semantics are changed, or rather potentially changed: there
> would be a lingering doubt as to whether a release call has pulled the
> rug from under your feet. But the point that I was trying to make was
> that the alternative would be to have programmers not use shared_ptr
> all and code work arounds with even worse uncertainties.

Hi Gavin,

OK, I understand now where you are going with this. And I agree. If we
can agree to have a #define which includes/excludes release() from the
smart_ptr, that would be satisfactory with me.

I am little torn, like you, in the release() vs. proxy issue. I like
the fact that with the proxy, you explicitly declare unsafe behavior.
However, introducing another class increases complexity of the code. If
we can have another opinion here, so we can settle the way how to
implement this.

Either way, release() however implemented gets my vote.



Boost list run by bdawes at, gregod at, cpdaniel at, john at