Re: Using scoped_ptr

2002-07-23 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Copying of a pointer is not very expensive and Angus> stl::container > is therefore pretty Angus> efficient... Fair enough. JMarc

Re: Using scoped_ptr

2002-07-23 Thread Angus Leeming
On Tuesday 23 July 2002 9:30 am, Jean-Marc Lasgouttes wrote: > > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > > Lars> Think: what is the scope of objects inside a stl::container? > Lars> Does any copyinbg occur? > > Lars> Then think about what a scoped_ptr is. > > Lars> Now rea

Re: Using scoped_ptr

2002-07-23 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Think: what is the scope of objects inside a stl::container? Lars> Does any copyinbg occur? Lars> Then think about what a scoped_ptr is. Lars> Now realize that you have to use a shared_ptr instead. Actually, copying occurs

Re: Using scoped_ptr

2002-07-22 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: | > John Levon wrote: | > | >> A subtle thing I found out a few weeks ago. You need to have an out of | >> line dtor for the object that has a scoped_ptr inside it. e.g. | >> XMiniBuffer needs an outofline dtor because

Re: Using scoped_ptr

2002-07-22 Thread Jean-Marc Lasgouttes
Jean-Marc Lasgouttes wrote: > John Levon wrote: > >> A subtle thing I found out a few weeks ago. You need to have an out of >> line dtor for the object that has a scoped_ptr inside it. e.g. >> XMiniBuffer needs an outofline dtor because it contains a scoped_ptr as >> a member on a forward-declare

Re: Using scoped_ptr

2002-07-22 Thread Jean-Marc Lasgouttes
John Levon wrote: > A subtle thing I found out a few weeks ago. You need to have an out of > line dtor for the object that has a scoped_ptr inside it. e.g. > XMiniBuffer needs an outofline dtor because it contains a scoped_ptr as > a member on a forward-declared class The kind of things I cqnnot