io.agora.rtc.internal.AudioRoutingController$HeadsetBroadcastReceiver
com.activity.ChatActivity has leaked IntentReceiver io.agora.rtc.internal.AudioRoutingController$HeadsetBroadcastReceiver@32f559 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity com.shqy.one.activity.ChatActivity has leaked IntentReceiver io.agora.rtc.internal.AudioRoutingController$HeadsetBroadcastReceiver@32f559 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:918)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:719)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1193)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1173)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1167)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:554)
at io.agora.rtc.internal.AudioRoutingController.initialize(AudioRoutingController.java:660)
at io.agora.rtc.internal.RtcEngineImpl.nativeObjectInit(Native Method)
at io.agora.rtc.internal.RtcEngineImpl.<init>(RtcEngineImpl.java:174)
at io.agora.rtc.RtcEngine.create(RtcEngine.java:61)
at com.common.manage.CallManageUtils.initializeEngine(CallManageUtils.java:122)
at com.activity.ChatActivity.initialize(ChatActivity.java:179)
at com.activity.ChatActivity.init(ChatActivity.java:115)
at com.activity.ChatActivity.main(ChatActivity.java:81)
at com.common.activity.BaseActivity.main(BaseActivity.java:54)
at com.common.activity.BaseActivity.onCreate(BaseActivity.java:43)
at android.app.Activity.performCreate(Activity.java:6278)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2396)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2503)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1353)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
引起泄露的原因是Context造成的内存泄露,解决方案:使用全局的Context来替代Activity的Context
本文地址:https://blog.csdn.net/he3527/article/details/107358892
上一篇: 司马朗:司马懿的兄长,最后什么结局?
下一篇: netty发送定长字符串 netty