Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-02-06 23:21:22


On 2/7/06, Giovanni P. Deretta <gpderetta_at_[hidden]> wrote:

[snip]

> You could argue that as this is a useful behavior stream_socket should
> have pointer semantics by default and be reference counted. But you
> would force the space and time overhead of a shared_ptr to everybody
> (btw, shared_ptr still require dynamic allocation of the reference
> counter).

Yes and No.
I'm arguing that it is a very useful behavior that should be supported
by the library. The default I'm not quite sure, maybe yes (it is the
safest choice, you wont be able to use the dangling socket without
knowing it), maybe no (unnecessary overhead for the reference count).
Or you believe that it shouldnt be supported by asio? Be in another
library? A move_resource<>/shared_resource<> "smart pointer"?

[snip]

> --
> Giovanni P. Deretta

best regards,

--
Felipe Magno de Almeida

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