We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.存在严重的内存泄露。ChartView 滑动时存在线性的内存增长。 ZYWCandleChartView.m CGMutablePathRef redRef = CGPathCreateMutable(); CGMutablePathRef greenRef = CGPathCreateMutable(); 这个需要手动释放。 // add CGPathRelease(redRef); CGPathRelease(greenRef);
2.浏览了代码,思路是在scrollview上放置ChartView。 这样做是有问题的,数据不断增长,ChartView的宽度可以无限变大。
3.可以只绘制当前界面需要显示的K线,减少不必要的开销。
The text was updated successfully, but these errors were encountered:
请问如何做到只绘制当前界面需要显示的k线?
Sorry, something went wrong.
可以做一个类似轮播似的, 三个界面轮训绘制k线数据。这样的话 不会无限创建出view了
我写了一个demo,借鉴了Cocoa-Charts的实现方式 https://github.com/stonelay/ZLKLineDemo CoreAnimation实现,不会影响主线程,目前看起来效率不错。
No branches or pull requests
1.存在严重的内存泄露。ChartView 滑动时存在线性的内存增长。
ZYWCandleChartView.m
CGMutablePathRef redRef = CGPathCreateMutable();
CGMutablePathRef greenRef = CGPathCreateMutable();
这个需要手动释放。
// add
CGPathRelease(redRef);
CGPathRelease(greenRef);
2.浏览了代码,思路是在scrollview上放置ChartView。
这样做是有问题的,数据不断增长,ChartView的宽度可以无限变大。
3.可以只绘制当前界面需要显示的K线,减少不必要的开销。
The text was updated successfully, but these errors were encountered: