Re: boost::shared_pointer

2001-05-28 Thread Baruch Even
* Lars Gullik Bjønnes <[EMAIL PROTECTED]> [010528 22:33]: > > you are mixing scoped_ptr and shared_ptr. I've though of shared_ptr as the no-ownership and smart_ptr as the reference counted one. Obviously I was wrong with the names. -- Baruch Even http://baruch.ev-en.org/

Re: boost::shared_pointer

2001-05-28 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | > Probably shared_ptr, _but_ that depend on how the copy contructor is | > supposed to work. Should the new object have a pointer to the same | > object that the first class points too? If you need a deep copy you | > have to write the copy con, copy as

Re: boost::shared_pointer

2001-05-28 Thread Andre Poenitz
> Probably shared_ptr, _but_ that depend on how the copy contructor is > supposed to work. Should the new object have a pointer to the same > object that the first class points too? If you need a deep copy you > have to write the copy con, copy assign. manually. Grmpf... Yes. I want deep copies.

Re: boost::shared_pointer

2001-05-28 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | I do not need to pass such things to functions a copy. | | So what would I use? Probably shared_ptr, _but_ that depend on how the copy contructor is supposed to work. Should the new object have a pointer to the same object that the first class points

Re: boost::shared_pointer

2001-05-28 Thread Lars Gullik Bjønnes
Baruch Even <[EMAIL PROTECTED]> writes: | * Andre Poenitz <[EMAIL PROTECTED]> [010528 09:46]: | > | > Is there some way to get "simple" smart_pointers (i.e. the copy/destuction | > behaviour of shared_pointer without the reference counting)? | | Yes and No. There is in the C++ standard a templa

Re: boost::shared_pointer

2001-05-28 Thread Andre Poenitz
> shared_ptr has no ownership, it keeps the pointer, copies the pointer on > assignment and the first shared_ptr to die, kills the pointer it keeps > with it. Ofcourse if you know where the pointer should not die, you can > use .reset(0) to say so. Uhuh... I knew I did something wrong... This wil

Re: boost::shared_pointer

2001-05-27 Thread Baruch Even
* Andre Poenitz <[EMAIL PROTECTED]> [010528 09:46]: > > Is there some way to get "simple" smart_pointers (i.e. the copy/destuction > behaviour of shared_pointer without the reference counting)? Yes and No. There is in the C++ standard a template for auto_ptr which is a smarter shared_ptr. For t

boost::shared_pointer

2001-05-27 Thread Andre Poenitz
Is there some way to get "simple" smart_pointers (i.e. the copy/destuction behaviour of shared_pointer without the reference counting)? It looks as though it hit me again... Andre' -- André Pönitz . [EMAIL PROTECTED]