Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2003-12-29 14:36:46

"Bronek Kozicki" <brok_at_[hidden]> wrote in message
> I need to be able to assign auto_ptr from shared_ptr. Here's simplified
> sample use:
> class M {
> boost::shared_ptr<int> ptr1_;
> boost::shared_ptr<int> ptr2_;
> public:
> M() : ptr1_ (boost::shared_ptr<int> (new int))
> {}

It's sufficient to write ptr1_(new int) here.

> Lack of such release function is real problem for me. Why it's not
> provided in shared_ptr? Is there any workaround I could use?

This question is addressed directly in the FAQ? (Q. Why doesn't shared_ptr
provide a release() function? )



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