Boost logo

Boost :

From: Scott McMurray ([hidden])
Date: 2008-03-19 18:37:19

On Wed, Mar 19, 2008 at 6:31 PM, Robert Dailey <rcdailey_at_[hidden]> wrote:
> Below I have posted code that I'm trying to clean up. I'm specifically
> trying to clean up the MainFunction() implementation.
> [...]

Sounds like auto_ptr could be of help:

void MainFunction()
   std::auto_ptr<Socket> mySocket(new Socket);

   if( mySocket->Connect() )
       sockets.push_back( mySocket.release() );

~ Scott

P.S. I think this kind of issue is more suited for boost-users than
boost-dev, for future posts.

Boost list run by bdawes at, gregod at, cpdaniel at, john at