Android OpenGL 内存使用分析?
我正在努力解决一些问题,我相信这些问题与我的 Android 应用程序有关,但我似乎无法弄清楚如何获取有关我的应用程序使用了多少内存的信息。
我怀疑我正在加载的某些纹理没有被垃圾收集器清除,但我希望能够在开始盲目进行更改之前进行测试。
我已经在 DDMS 上苦苦挣扎了好几个小时,虽然我可以连接它,但我无法弄清楚输出的正反面。这些分配似乎只向我显示基本的对象分配,而我关心的是我的 openGL 纹理和音频文件等内存使用情况。
任何有关 Android 上 openGL 应用程序内存使用情况分析的建议将不胜感激,谢谢!
I'm struggling with some issues which I believer are memory related with my Android app, yet I can't seem to figure out how to get information on how much memory my app is using.
I have a suspicion that some textures I am loading are not getting cleared by the garbage collector, but I want to be able to test before I start blindly making changes.
I've been struggling with DDMS for hours, and while I can get it to connect, I can't make heads or tails of the output. The allocations only seems be showing me basic object allocations, whereas what I'm concerned about is what's going on with memory using by things like my openGL textures and audio files.
Any advice on profiling memory usage in openGL apps on Android would be much appreciated, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,你有没有在你想要卸载的纹理上调用 gldeletetexture ?
如果您不打算再使用您的纹理(例如水平背景等),则必须手动删除它。
uhm have you call gldeletetexture on the textures you want to unload?
you have to manually delete your texture( like your level background and such) if you don't plan to use it anymore.