summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-05-16 11:27:41 -0600
committerJason Smith <jason.smith@xamarin.com>2017-05-16 11:50:17 -0700
commite1734092bec06d5e013144f13c947c040586cec8 (patch)
treecb523df2f2c0e490847222f1e5a0afa84acb67cb /Xamarin.Forms.Core.UnitTests
parentbb632ea0666d22f23c6f48264800ddf32aeaf25f (diff)
downloadxamarin-forms-e1734092bec06d5e013144f13c947c040586cec8.tar.gz
xamarin-forms-e1734092bec06d5e013144f13c947c040586cec8.tar.bz2
xamarin-forms-e1734092bec06d5e013144f13c947c040586cec8.zip
Remove VisualElement finalizer (#918)
* [Controls] Add repo for bugzilla 55365 * Remove finalizer from VisualElement * Remove unused using directive * Removing test for 44074 * Update docs
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests')
-rw-r--r--Xamarin.Forms.Core.UnitTests/BehaviorTest.cs37
1 files changed, 0 insertions, 37 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/BehaviorTest.cs b/Xamarin.Forms.Core.UnitTests/BehaviorTest.cs
index 90217389..464f9731 100644
--- a/Xamarin.Forms.Core.UnitTests/BehaviorTest.cs
+++ b/Xamarin.Forms.Core.UnitTests/BehaviorTest.cs
@@ -109,42 +109,5 @@ namespace Xamarin.Forms.Core.UnitTests
collection.Remove (behavior);
Assert.Null (behavior.AssociatedObject);
}
-
- [Test]
- //https://bugzilla.xamarin.com/show_bug.cgi?id=44074
- public void TestBehaviorsAreDetachedBeforeGarbageCollection()
- {
- WeakReference weakBindable = null;
-
- var attachCount = MockBehavior<VisualElement>.AttachCount;
-
- int i = 0;
- Action create = null;
- create = () =>
- {
- if (i++ < 1024)
- {
- create();
- return;
- }
-
- var bindable = new MockBindable
- {
- Behaviors = {
- new MockBehavior<VisualElement> ()
- }
- };
- weakBindable = new WeakReference(bindable);
- };
-
- create();
-
- GC.Collect();
- GC.WaitForPendingFinalizers();
- GC.Collect();
-
- Assert.False(weakBindable.IsAlive);
- Assert.AreEqual(attachCount, MockBehavior<VisualElement>.AttachCount);
- }
}
} \ No newline at end of file