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

内存 #1

Open
jjmlife opened this issue Jan 19, 2018 · 4 comments
Open

内存 #1

jjmlife opened this issue Jan 19, 2018 · 4 comments

Comments

@jjmlife
Copy link

jjmlife commented Jan 19, 2018

貌似有内存泄漏啊 , 真机从25M , 滑动几下后到了80M了

@hardman
Copy link
Owner

hardman commented Jan 19, 2018

可以用instrument检测一下,没有内存泄露的

@songqingcool
Copy link

我没有去验证有没有内存泄漏,但是对于一些关键的例如CTFrameRef复用,其实处理的并不好,所以我感觉内存峰值什么的,还是大概率会有问题的。尤其是多表情多链接等的复杂展示

@hardman
Copy link
Owner

hardman commented Jan 24, 2018

嗯,多谢建议,我会继续优化的~

@hardman
Copy link
Owner

hardman commented Jan 24, 2018

我看了一下代码,内存占用最多的还是AttributedString和图片等资源。
CTFrameRef只是临时变量,即使计算Size和drawRect都创建了,也是分时间前后的,而且用完了就删除了,并不会同时存在创建的2个CTFrameRef的问题。
所以我觉得这不是一个大问题。理论上也不会出现内存峰值的。

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

3 participants