Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Add a missing virtual destructor to CollectionChangeCallback
Browse files Browse the repository at this point in the history
This resulted in the destructor for the callback object passed to
`add_notification_callback()` not being called, potentially resulting in memory
leaks when removing notification callbacks.
tgoyne committed Oct 16, 2018
1 parent 53b6e0e commit 362b886
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/collection_notifications.hpp
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ class CollectionChangeCallback {

private:
struct Base {
virtual ~Base() {}
virtual void before(CollectionChangeSet const&)=0;
virtual void after(CollectionChangeSet const&)=0;
virtual void error(std::exception_ptr)=0;

0 comments on commit 362b886

Please sign in to comment.