Skip to content

Commit

Permalink
Clean up invokable on destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Oct 18, 2016
1 parent 01f939d commit c15ef5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.0.0-b17

* Clean up invokable on destruction

--------------------------------------------------------------------------------

1.0.0-b16

* Make value optional in param-list
Expand Down
8 changes: 2 additions & 6 deletions include/beast/websocket/detail/invokable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,11 @@ class invokable
alignas(holder<exemplar>) buf_type buf_;

public:
#ifndef NDEBUG
~invokable()
{
// Engaged invokables must be invoked before
// destruction otherwise the io_service
// invariants are broken w.r.t completions.
BOOST_ASSERT(! base_);
if(base_)
base_->~base();
}
#endif

invokable() = default;

Expand Down

0 comments on commit c15ef5b

Please sign in to comment.