谷歌播放服务泄漏 [英] Google Play Services Leak
问题描述
我开始使用谷歌Play游戏服务前一阵子,昨天在检查我不能帮助注意到这个错误的logcat的:
I started using Google Play Game Services a while ago, and yesterday while checking the logcat I couldnt help to notice this error:
02-11 02:19:57.949: E/DataBuffer(3183): Internal data leak within a DataBuffer object detected! Be sure to explicitly call close() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@40555410)
有发生几次在一排。林不完全知道为什么它出现。它没有让我的应用程序崩溃,也使得谷歌业绩/排行榜的功能停止工作。
It occurs several times in a row. Im not exactly sure why it arises. It doesnt make my app crash nor makes the google achievement/leaderboards functionality stop working.
我所知道的是,它与功能相关的unlockAchievementImmediate和submitScoreImmediate。
All I know is that it is related to the functions "unlockAchievementImmediate" and "submitScoreImmediate".
有没有人遇到过这个问题,或者有什么建议吗?
Has anybody encountered this problem before or has any suggestions?
推荐答案
这些项目扩展的DataBuffer:AchievementBuffer,AppStateBuffer,FilteredDataBuffer,GameBuffer,InvitationBuffer,LeaderboardBuffer,LeaderboardScoreBuffer,MetadataBuffer,MomentBuffer,ParticipantBuffer,PersonBuffer,PlayerBuffer,TurnBasedMatchBuffer
These items extend DataBuffer: AchievementBuffer, AppStateBuffer, FilteredDataBuffer, GameBuffer, InvitationBuffer, LeaderboardBuffer, LeaderboardScoreBuffer, MetadataBuffer, MomentBuffer, ParticipantBuffer, PersonBuffer, PlayerBuffer, TurnBasedMatchBuffer.
这些通常在这些特定项目的听众发现。例如:
These are generally found in your listeners of those particular items. For example:
public void onTurnBasedMatchesLoaded(int statusCode, LoadMatchesResponse response)
{
TurnBasedMatchBuffer buff = response.getMyTurnMatches();
// do some stuff with buff
buff.close()
}
public void onPlayersLoaded(int statusCode, PlayerBuffer buff)
{
Player p = buff.get(0);
buff.close();
}
该错误不报告,直到后,我离开我的应用程序,然后重新输入。如果我把我的比赛3次,无需调用buff.close(退出应用程序),我可以期待在再升开回看到警告3次。添加在buff.close(),他们消失。瞧!
The error doesn't report until after I exit my app and re-enter. If I call up my matches 3 times and exit the app without calling buff.close(), I can expect to see the warning 3 times upon opening it back up again. Add in the buff.close() and they disappear. Voila!
这篇关于谷歌播放服务泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!