Alb*_*haw 1 memory objective-c ios automatic-ref-counting drawinrect
我在互联网上搜索过,我发现很多人和我有同样的问题而没有解决方案......
如果我有像NSTimer这样的东西并让它反复循环而我将这段代码粘在其中由于某种原因我得到大量的内存泄漏并且应用程序在大约100个左右循环后崩溃.
但我启用了ARC.
drawInRect根据乐器,记忆问题肯定是胜利.
-(void)nstimerTick {
UIGraphicsBeginImageContextWithOptions(testView.frame.size, NO, 0.0);
[[testView image] drawInRect:testView.bounds];
testView.image = UIGraphicsGetImageFromCurrentImageContext();
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1126 次 |
| 最近记录: |