Work around SpellCheckerSession leak?

无人久伴 提交于 2019-12-23 09:32:31

问题


I discovered my Activity is leaking on the ICS emulator. HProf seemed to show SpellCheckerSession keeping a reference to my Activity around, and there appears to have been a fix:

https://github.com/android/platform_frameworks_base/commit/df3722895172e03c81787f62d922daabaad3e20b

But is there any way to work around this in the mean time? Can I disable spell checking somehow?


回答1:


Does it need a Context? Maybe pass the Application Context by using activity.getApplicationContext().




回答2:


I've found the same issue. The workaround was to disable spell checking for all EditText fields.

See my response here: Why does EditView retain its Activity's Context in Ice Cream Sandwich



来源:https://stackoverflow.com/questions/9056320/work-around-spellcheckersession-leak

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