我发现使用泄漏金丝雀的内存泄漏,我认为与InputHandler有关。它可能是Android sdk上的一个错误
11-23 19:14:12.267 6871-8173/com.example D/LeakCanary: * com.example.ui.record.RecordActivity has leaked:
11-23 19:14:12.267 6871-8173/com.example D/LeakCanary: * GC ROOT android.view.ViewRootImpl[.this$0 (anonymous class implements android.view.InputHandler)
11-23 19:14:12.267 6871-8173/com.example D/LeakCanary: * references android.view.ViewRootImpl.mFallbackEventHandler
11-23 19:14:12.267 6871-8173/com.example D/LeakCanary: * references com.android.internal.policy.impl.PhoneFallbackEventHandler.mContext
11-23 19:14:12.267 6871-8173/com.example D/LeakCanary: * leaks com.example.ui.record.RecordActivity instance
11-23 19:14:12.267 6871-8173/com.example D/LeakCanary: * Reference Key: f8f44240-d6e0-475e-aaa4-bd6aa90de2bd]