Browse Source
Merge pull request #5613 from MarchingCube/more-mono-trickery
Add more mono trickery
pull/5615/head
Jumar Macato
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
tests/Avalonia.Markup.UnitTests/Parsers/ExpressionObserverBuilderTests_AttachedProperty.cs
|
|
@ -117,9 +117,11 @@ namespace Avalonia.Markup.UnitTests.Parsers |
|
|
var result = run(); |
|
|
var result = run(); |
|
|
result.Item1.Subscribe(x => { }); |
|
|
result.Item1.Subscribe(x => { }); |
|
|
|
|
|
|
|
|
GC.Collect(); |
|
|
// Mono trickery
|
|
|
|
|
|
GC.Collect(2); |
|
|
GC.WaitForPendingFinalizers(); |
|
|
GC.WaitForPendingFinalizers(); |
|
|
GC.Collect(); |
|
|
GC.WaitForPendingFinalizers(); |
|
|
|
|
|
GC.Collect(2); |
|
|
|
|
|
|
|
|
Assert.Null(result.Item2.Target); |
|
|
Assert.Null(result.Item2.Target); |
|
|
} |
|
|
} |
|
|
|