Following up on my last question, here is the second memory leak I can not get rid of..
I read that I need to register and unregister my static Otto bus according to
You are using watching the reference at the wrong time. You should only call watch(thing)
when you are absolutely certain that thing
will be garbage collected. For your Activities and Fragments, you will want something like this:
@Override public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = ExampleApplication.getRefWatcher(getActivity());
refWatcher.watch(this);
}
That is from the LeakCanary FAQ "How do I use it?" section