mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-12 07:14:23 +00:00
65a748de0c
`Realm`, and moving from a `Results` to not result in a use-after-free. The compiler generated move-assignment operator resulted in `m_notifier` being assigned to without first calling `CollectionNotifier::unregister`. This left a retain cycle in place, causing the `Realm` and other objects to leak. `ResultsNotifier` keeps track of which `Results` it should update when a new `TableView` becomes available. When `Results` move-assignment operator and move-constructor transfer ownership of the `ResultsNotifier` to a new instance they also need to update its target so it won't attempt to update the moved-from `Results`.