Special Memory Leak For IOS---drawinrect
来源:互联网 发布:软件项目建设方案 编辑:程序博客网 时间:2024/06/10 10:26
http://stackoverflow.com/questions/8236837/memory-leak-drawinrect-on-ios5-0-1
I believe I have FINALLY found the cause of the memory leak. I discovered similar behavior when doing some Core Data inserts. Looping, creating many objects that are released. When run on iPad, memory usage goes up although no leak is evident until the app crashes out of memory. But when initiated from the device, it runs without a problem.
It occurred to me that its something about the way its being started from Xcode. Must be a debug setting in the project.
Turns out the problem was caused by having NSZombieEnabled
while debugging. To disable this setting in Xcode 4, right click on the schemes, ie app>targetDevice, edit the scheme, select the Debug action, arguments tab. To enable NSZombieEnabled
, an environment variable is created with that name with a value of YES and the variable is enabled. To disable it, uncheck the checkbox.
NSZombieEnabled
is used to determine if you attempt to release an object that has already been released. To do this, the environment is keeping track of all released objects. This is consuming memory which appears as a memory leak.
Once I disabled this, my app that used to quickly grow over 115MB before being killed on an iPad1 now happily sits at 24MB with no memory leak.
- Special Memory Leak For IOS---drawinrect
- iOS MKMapView Memory Leak
- memory leak checking for android
- iOS: memory leak about "strdup"
- Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++
- Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++
- Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++
- Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++
- vld for memory leak detector (release version)
- (Memory and Resource) Leak detection for WinCE
- valgrind memory leak check for nginx
- IOS Dev Intro - ARC Memory Leak
- Automatic memory leak detection on iOS
- Memory Leak
- memory leak
- Memory leak
- IE Sieve, Memory Leak detector for Internet Explorer
- 【有疑问,待解决】iOS 9 memory leak
- FFMPEG源码分析(1)----初版--持续更新
- java——棋牌类游戏五子棋(singlewzq1.0)之一
- 浅谈在BCB中数组的妙用和纪录和改变控件的状态
- 电商平台Fancy融资5300万美元 史密斯参投
- smarty模板中判断一个字符包含在一个字符串里
- Special Memory Leak For IOS---drawinrect
- 电商淡季如何度过
- FFMPEG源码分析(1)--再版--持续更新
- js 返回上一页(按住ctr+鼠标点击及右键打开新标签的返回)
- poj1961之KMP应用
- ORACLE 修改表的表空间
- java——棋牌类游戏五子棋(singlewzq1.0)之二
- vector容器类型
- 遇到的不能刷新Product Flat Data