我的 cocos2d 应用程序每秒增加实际内存使用量是否正常?我的、应用程序、使用量、实际

2023-09-06 10:39:57 作者:原谅这世上没有童话i

我为 iPad 开发 cocos2d iOS 应用程序.当我测试内存泄漏和对象分配时,我的 Live Bytes 是稳定的,但是当我运行 Activity Monitor 时,我看到我的应用程序的实际内存使用量每秒增加 0.02MB.

I develop cocos2d iOS app for iPad. When I test memory leaks and object allocation my Live Bytes are stable, but when I run Activity Monitor I see that the Real Memory Usage of my app increase every second with 0.02MB.

我想问一下这正常吗,有没有人遇到过类似的问题?

I want to ask is it normal and did someone have similar problems?

推荐答案

我记得我有这个问题是因为我记录了调试消息!

I remember that I have this problem because I log debug messages!

我以循环周期(每帧)记录此消息,这就是内存增加的原因!

I logging this messages in loop cycles (every frame) and this was the reason why the memory increasing!

请清除或评论所有日志消息,这将解决您的问题:)

Please clear or comment all log messages, this will slove your problem :)