mologie/curl-asio — pull request #4 by Boris-Rasin (2014-11-23 14:34:13+00:00)
Title: fix callback handler cleanup

Make sure all handler instances are destroyed after completion. This
allows code to hold shared pointer to easy object inside it's
own completion functor:

auto easy = std::make_shared(multi);
// ...
easy->async_perform([easy](const boost::system::error_code& ec)
{
// ...
});

Previously this code lead to memory leak because of circular shared pointers. After this fix the code works as expected.