【发布时间】:2014-03-08 22:23:04
【问题描述】:
我不久前开始使用 Google Play 游戏服务,昨天在检查 logcat 时我忍不住注意到了这个错误:
E/DataBuffer(3183):DataBuffer 对象内的内部数据泄漏 检测到!确保在所有 DataBuffer 上显式调用 close() 完成后扩展对象。 (内部对象: com.google.android.gms.common.data.DataHolder@40555410)
它连续出现多次。我不确定它为什么会出现。它不会让我的应用崩溃,也不会让谷歌成就/排行榜功能停止工作。
我只知道它与“unlockAchievementImmediate”和“submitScoreImmediate”函数有关。
有没有人遇到过这个问题或者有什么建议?
编辑:在我的应用中,我只使用“unlockAchievementImmediate”和“submitScoreImmediate”。这些函数不返回任何需要关闭的缓冲区。
【问题讨论】:
-
当我使用 AppStateClient 的 onStateLoadedListener 时也会发生这种情况(这很有趣,因为甚至没有返回 Buffer 对象,所以不确定 Google 希望我如何关闭它!)
标签: android memory-leaks google-play-services google-play-games