From 8623aa6c6b15e3b08fe2de124e8b84b2fb9f2994 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 28 Mar 2016 15:46:43 -0700 Subject: [PATCH] Actually unregister List notifiers when the List is destroyed --- src/list.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/list.cpp b/src/list.cpp index b6ac8c61..38adfac8 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -29,7 +29,12 @@ using namespace realm; using namespace realm::_impl; List::List() noexcept = default; -List::~List() = default; +List::~List() +{ + if (m_notifier) { + m_notifier->unregister(); + } +} List::List(std::shared_ptr r, const ObjectSchema& s, LinkViewRef l) noexcept : m_realm(std::move(r))