Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't pass reference of batchOperation to closure to restore behavior…
… before c7c79c7 (#116) c7c79c7 introduced a regression: The completion closure of `UICollectionView.performBatchUpdates(_:completion:)` has a strong reference to `batchOperation`. This causes that the `batchOperation` stays longer in memory as the collection view itself. A symptom of this is that `MainCollectionViewContext.apply(update:)` might get called while the `adapter` is deallocated already. This PR restores behavior to the state before c7c79c7 by just referencing the `completion` closure instead of `batchOperation`.
- Loading branch information