Last active
June 7, 2016 07:36
-
-
Save mreichelt/35d4e3afd8744aa75e8ecb84418c3f90 to your computer and use it in GitHub Desktop.
Revisions
-
mreichelt revised this gist
Jun 7, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,10 @@ public class TestApp extends OurApp { @Override protected void createComponents() { OurTestComponent component = mock(OurTestComponent.class); // required so our App init call works properly, which registers these callbacks // WOAH, this is responsible for the memory leak!! But why? when(component.activityLifecycleCallbacks()) .thenReturn(mock(activityLifecycleCallbacks)); OurApp.setComponent(component); } -
mreichelt revised this gist
Jun 6, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ public class TestApp extends OurApp { protected void createComponents() { OurTestComponent component = mock(OurTestComponent.class); // required so our init call in OurApp works properly, which registers these callbacks // WOAH, this is responsible for the memory leak!! But why? when(component.activityLifecycleCallbacks()).thenReturn(mock(activityLifecycleCallbacks)); OurApp.setComponent(component); } -
mreichelt revised this gist
Jun 6, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ public class TestApp extends OurApp { /** overrides method in OurApp that initializes our actual Dagger2 component */ @Override protected void createComponents() { OurTestComponent component = mock(OurTestComponent.class); -
mreichelt created this gist
Jun 6, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ public class TestApp extends OurApp { /** overrides method in OurApp that implements the actual Dagger2 component */ @Override protected void createComponents() { OurTestComponent component = mock(OurTestComponent.class); // required so our init call in OurApp works properly, which registers these callbacks when(component.activityLifecycleCallbacks()).thenReturn(mock(activityLifecycleCallbacks)); OurApp.setComponent(component); } }