Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMQPQueue::~AMQPQueue() is error #62

Open
hanxqrr opened this issue May 23, 2017 · 0 comments
Open

AMQPQueue::~AMQPQueue() is error #62

hanxqrr opened this issue May 23, 2017 · 0 comments

Comments

@hanxqrr
Copy link

hanxqrr commented May 23, 2017

AMQPQueue::~AMQPQueue() {
this->closeChannel();
if (pmessage)
delete pmessage;
}
, but use interface Consume, line 451,456, pmessage is a temporary var, don't manage the life cycle of AMQPMessage, so that ::~AMQPQueue() , delete pmessage is error .
#if __cplusplus > 199711L // C++11 or greater
unique_ptr message ( new AMQPMessage(this) );
#else
auto_ptr message ( new AMQPMessage(this) );
#endif
pmessage = message.get();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant