Actually unregister List notifiers when the List is destroyed

This commit is contained in:
Thomas Goyne 2016-03-28 15:46:43 -07:00
parent 45705b18d2
commit 8623aa6c6b
1 changed files with 6 additions and 1 deletions

View File

@ -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<Realm> r, const ObjectSchema& s, LinkViewRef l) noexcept
: m_realm(std::move(r))