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.
  • Loading branch information
tgoyne committed Oct 16, 2018
1 parent 53b6e0e commit 98612b9
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
Expand Up @@ -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;
Expand Down

0 comments on commit 98612b9

Please sign in to comment.