Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果有的话,你如何以编程方式清除核心动画缓存。随着时间的推移,我的应用程序的性能变得非常缓慢,并且配置文件告诉我这是因为 Core Animation。我希望是否可以不时刷新我的应用程序中的核心动画。
我相信这不是缓存问题,即使你在这个区域搞砸了,你也会遇到另一个问题,我建议运行分析器并检查你是否在某个地方有泄漏,确保你正在释放你所有的 ivars,使用 CGImageRelease(cgImage), CGPathRelease(path), ..等
CGImageRelease(cgImage)
CGPathRelease(path)
另外看看这里和这里