Boost logo

Boost :

From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-03-09 08:22:25


On Wed, 8 Mar 2000, Dave Abrahams wrote:

> on 3/8/00 8:21 AM, Kevin Atkinson at kevinatk_at_[hidden] wrote:
>
> >> [gee, the raw pointer member rhs is starting to look like it ought to be a
> >> std::auto_ptr to me ;)]
> >>
> >
> > I don't know how serious you are but by pointers are different than
> > auto_ptr when ever one of my pointers is assigned to another a copy is
> > made. Auto_ptr on the other hand transfers ownership.
>
> I'm actually serious, but I think you misunderstood my intention. I'm
> suggesting that your smart pointer should be implemented in terms of
> auto_ptr; maybe you should think about using auto_ptr members instead of raw
> pointer members.

Oh, OK, sorry for the misunderstanding. Anyway I can't really use
auto_ptr becuase auto_ptr only works with delete while I made my
GenericCopyPtr suffectly generic to work with any sort of memory managment
including new[]/del[], malloc/free, mmap/munmap, or some other one
specific to a particuler API where they provide there own free function
you are expected to use.

---
Kevin Atkinson
kevinatk_at_[hidden]
http://metalab.unc.edu/kevina/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk