Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

持续使用drawBitmap导致内存泄露 #90

Open
fenglank opened this issue Aug 17, 2020 · 7 comments
Open

持续使用drawBitmap导致内存泄露 #90

fenglank opened this issue Aug 17, 2020 · 7 comments

Comments

@fenglank
Copy link

持续使用drawBitmap导致内存泄露,从而导致App程序自杀

@ChillingVan
Copy link
Owner

是每次都创建一个新的bitmap吗?试一下能不能只用invalidateTextureContent来触发?

@fenglank
Copy link
Author

我试过。还是会。循环1w次。内存3G多

@ChillingVan
Copy link
Owner

可以贴一下代码吗?

@fenglank
Copy link
Author

就是你写的那个drawtext

@fenglank
Copy link
Author

你试着绘制久一点,短时间没事,时间长了。就。。

@ChillingVan
Copy link
Owner

ChillingVan commented Aug 24, 2020

这个是运行6分22秒的内存,打开的是DrawTextActivity,用的是小米8。
RES一直保持在150M左右
图片

版本是最新的1.5.2.0。可能是之前版本的问题?或者跟机型相关

@fenglank
Copy link
Author

我是小米10,用的也是最新的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants