我使用的是LeakCanary
1.4-beta2 版本,并且刚刚在我的应用中添加了 Facebook sdk。更准确地说,我只在 MyApplication 类中添加了这段代码onCreate
:
FacebookSdk.sdkInitialize(getApplicationContext());
但是我从以下位置收到此错误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
我应该如何处理这个问题?我的代码中是否存在问题,我应该进行更多调查,或者它与 Facebook/LeakCanary 代码有关,我应该提出问题?