Fix ObjectDisposedException crash when loading PRs #507

Merged
merged 3 commits into from Aug 18, 2016

1 participant

@shana

Fixes #505

@shana shana Make sure we dispose in the right order
Disposing of everything in the TrackingCollection in one go is
potentially going to cause the signal objects to be disposed before the
pumps are. Since pumps rely on the signal objects, this can cause
disposed exceptions.
9bce8cc
@shana shana Fix crash when removing first item of a filtered collection
df462fd
@grokys grokys commented on an outdated diff Aug 18, 2016
src/TrackingCollectionTests/TrackingCollectionTests.cs
+
+ Assert.AreEqual(8, col.Count);
+ CollectionAssert.AreEqual(col, new List<Thing> {
+ GetThing(1, 1),
+ GetThing(3, 3),
+ GetThing(4, 4),
+ GetThing(6, 6),
+ GetThing(7, 7),
+ GetThing(8, 8),
+ GetThing(9, 9),
+ GetThing(10, 10),
+ });
+
+ col.Filter = null;
+
+ expectedCount = 15;
@grokys
grokys added a note Aug 18, 2016

This unit test is getting rather long - might it be best to split this test out into a separate test method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@shana shana Add separate test for the remove crash
b417c52
@shana shana merged commit 7c0e155 into master Aug 18, 2016

5 checks passed

Details GitHub CLA @shana has accepted the GitHub Contributor License Agreement.
Details VisualStudio Build #3884012 succeeded in 82s
Details continuous-integration/appveyor/branch AppVeyor build succeeded
Details continuous-integration/appveyor/pr AppVeyor build succeeded
Details jenkins/build_log Jenkins Build Log
@shana shana deleted the fixes/505-crash-in-tracking-collection branch Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment