Loading tools/data-binding/integration-tests/TestApp/app/src/androidTest/java/android/databinding/testapp/LeakTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,11 @@ public class LeakTest extends ActivityInstrumentationTestCase2<TestActivity> { getActivity().setContentView(new FrameLayout(getActivity())); } }); WeakReference<Object> canary = new WeakReference<Object>(new Object()); while (canary.get() != null) { byte[] b = new byte[1024 * 1024]; System.gc(); } assertNull(mWeakReference.get()); } Loading Loading
tools/data-binding/integration-tests/TestApp/app/src/androidTest/java/android/databinding/testapp/LeakTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,11 @@ public class LeakTest extends ActivityInstrumentationTestCase2<TestActivity> { getActivity().setContentView(new FrameLayout(getActivity())); } }); WeakReference<Object> canary = new WeakReference<Object>(new Object()); while (canary.get() != null) { byte[] b = new byte[1024 * 1024]; System.gc(); } assertNull(mWeakReference.get()); } Loading