akalend/amqpcpp — pull request #8 by jerrybao (2012-04-12 01:14:00+00:00)
Title: Free up connection data if we are not able to connect to server.

We have someone writing code to keep trying to connect to the server until it's up. This is done by trying to new an AMQP object. Obviously newing an AMQP object would throw an AMQPException with message ="AMQP cannot create socket descriptor" when server is down. However we found that it's holding on some memory and it was traced down to not releasing the connection data before throwing this exception. This was eating up memory and eventually crashed.

The fix is to free it up before throwing AMQPException.