iphone模拟器上模拟内存警告
2011-06-17 10:27
295 查看
有三种方法可以实现内存警告。
1.模拟器菜单:Hardware-》Simulate Memory Warning
2.用程序的方法实现,只需要一句代码:
3.这是私有api方法:
1.模拟器菜单:Hardware-》Simulate Memory Warning
2.用程序的方法实现,只需要一句代码:
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), (CFStringRef)@"UISimulatedMemoryWarningNotification", NULL, NULL, true);
3.这是私有api方法:
SEL memoryWarningSel = @selector(_performMemoryWarning); if ([[UIApplication sharedApplication] respondsToSelector:memoryWarningSel]) { [[UIApplication sharedApplication] performSelector:memoryWarningSel]; }else { NSLog(@"%@",@"Whoops UIApplication no loger responds to -_performMemoryWarning"); }
相关文章推荐
- 用模拟器模拟内存警告:Received memory warning
- Iphone开发中的两个小bug,1.调用camera时的内存警告导致view自动upload,2,Not enough frames in stack.
- 模拟内存警告
- iOS 开发中 代码实现 模拟内存警告
- iOS 真机模拟内存警告
- iPhone模拟器里面模拟两个手指做放大缩小的手势
- iOS 真机模拟内存警告
- iOS真机模拟内存警告
- iPhone相机和内存警告
- 关于内存警告的问题
- iOS开发 - Xcode如何更换iPhone或iPad模拟器的类型
- iOS内存警告
- Xcode8模拟器警告与iOS10真机调试NSLog无效
- python c/s模式下的内存监控模拟代码 推荐
- SDWebImage加载大图导致的内存警告问题
- iphone-- 检测iphone内存泄漏-内存泄漏工具教程
- 在ipad/iphone模拟器显示需要的文字的方法
- iOS6内存警告处理
- WTK 模拟器内存不足问题
- Android 如何设置 模拟器内存