
7 Feb
2006
7 Feb
'06
4:50 a.m.
Stefan Seefeld wrote:
Giovanni P. Deretta wrote:
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).
If users would always only hold references to the real resource, how would they declare interest in a 'ready-for-read' event, and which of the references would receive it ?
I do not understand exactly what you are asking? Could you eleaborate? -- Giovanni P. Deretta