Skip to content

Instantly share code, notes, and snippets.

@moea
Created April 12, 2013 09:59
Show Gist options
  • Save moea/5370961 to your computer and use it in GitHub Desktop.
Save moea/5370961 to your computer and use it in GitHub Desktop.
@@ -15,6 +15,8 @@ public class LeakingActivity extends Activity
private static final int BYTES_TO_ALLOCATE = BYTES_IN_A_MEGABYTE;
private static final String HPROF_DUMP_BASENAME = "LeakingActivity.hprof";
+ private final ToyMessageBus messageBus = ToyMessageBus.getInstance();
+
private byte[] byteArray;
private TextView heapSizeTextView;
@@ -65,5 +67,6 @@ public class LeakingActivity extends Activity
public void onResume() {
super.onResume();
updateHeapSize();
+ messageBus.register(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment