From 98612b98ba59c104356ec82e781102af793c50a2 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 16 Oct 2018 13:10:14 -0700 Subject: [PATCH] Add a missing virtual destructor to CollectionChangeCallback 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. --- src/collection_notifications.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/collection_notifications.hpp b/src/collection_notifications.hpp index 919e8b465..bbd41e534 100644 --- a/src/collection_notifications.hpp +++ b/src/collection_notifications.hpp @@ -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;