Skip to content

Commit

Permalink
Fix Disposables not disposed in test (#3385)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Oct 20, 2022
1 parent eebbacf commit e45982e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ReactiveUI.Tests/Platforms/winforms/Mocks/TestForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,16 @@ public TestForm(short activate)
public IObservable<Unit> Deactivated => _deactivated.AsObservable().Publish().RefCount();

IObservable<Unit> ICanActivate.Activated => _activated.AsObservable().Publish().RefCount();

protected override void Dispose(bool disposing)
{
if (disposing)
{
_activated.Dispose();
_deactivated.Dispose();
}

base.Dispose(disposing);
}
}
}

0 comments on commit e45982e

Please sign in to comment.