Facebook is causing my activity to leak

佐手、 提交于 2019-12-11 00:26:56

问题


I'm using LeakCanary version 1.4-beta2 and I have just added Facebook sdk in my app. More precisely I have only added in MyApplication class this code in onCreate :

        FacebookSdk.sdkInitialize(getApplicationContext());

Yet I get this error from LeakCanary :

In css.demo.debug:1.0:1.
* css.demo.main.projects.ProjectsActivity has leaked:
* GC ROOT static com.facebook.appevents.internal.ActivityLifecycleTracker.currentFuture
* references java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.callable   * references java.util.concurrent.Executors$RunnableAdapter.task
* references com.facebook.appevents.internal.ActivityLifecycleTracker$4$1.this$0 (anonymous implementation of java.lang.Runnable)
* references com.facebook.appevents.internal.ActivityLifecycleTracker$4.val$activity (anonymous implementation of java.lang.Runnable)
* leaks css.demo.main.projects.ProjectsActivity instance

How should I deal with this problem ? Is there a problem somewhere in my code and I should investigate more or it has something to do with Facebook/LeakCanary code and I should file an issue?

来源:https://stackoverflow.com/questions/38183070/facebook-is-causing-my-activity-to-leak

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!