android - Memory leak by AttachInfo.mRootCallbacks reported by LeakCanary -
i'm using leakcanary library troubleshoot memory leak of activity. after fixing several issues got logcat output : com.mypackage.activities.myactivity has leaked: gc root com.mypackage.myview.mattachinfo references android.view.view$attachinfo.mrootcallbacks references android.view.viewrootimpl.mcontext leaks com.mypackage.activities.myactivity instance i have no idea reference mean. view keeping reference activity prevents being gced? when , how should handle it? i used eclipse memory analyze tool tool , found there no instances of activity alive. make sense? also opened issue canary. edit 1 : relevant implementation : public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { myview.interactioncallbacks interactioncallback = new interactioncallbackimplementation( mnewview = new myview(getactivity().getapplicationcontext(), layoutinflater li = (layoutinflater) getactivity().getapp...