QPID-7306: Memory management error in Link/Bridge

qpid::broker Link and Bridge use Connection::requestIOProcessing() to register
callbacks in the connection thread. They were binding a plain "this" pointer to
the callback, but the classes are managed by boost::shared_ptr so if all the
shared_ptr were released, the callback could happen on a dangling pointer.

This fix uses boost::weak_ptr in the callbacks, so if all shared_ptr instances
are released, we don't use the dead pointer.

Link::destroy cannot be skipped, so use a shared_ptr for that.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1749780 13f79535-47bb-0310-9956-ffa450edef68
4 files changed
tree: c6acf024eb57f9360ef50055bfbf3ce0fbd1b2d9
  1. qpid/
  2. .gitignore
  3. .mailmap
  4. .travis.yml
  5. appveyor.yml