下载此文档

开发高质量的iOS应用.pdf


文档分类:IT计算机 | 页数:约44页 举报非法文档有奖
1/44
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/44 下载此文档
文档列表 文档介绍
High Quality iOS
Development
***@robinlu
IN-SRC Studio
Saturday, April 9, 2011
Quality
Saturday, April 9, 2011
Topics
• Memory management
• To o l s
• Crash Reports
• Test
Saturday, April 9, 2011
Memory Management
Saturday, April 9, 2011
Memory Management
alloc object
+1 -1
copy reference release
retain count
0
dealloc
Saturday, April 9, 2011
Ownership
Declare ownership Release ownership
• create / copy • don’t need anymore
• instance variable • dealloc of owner
• container
• multi-thread
• ...
Saturday, April 9, 2011
Autorelease
• give the ownership to autorelease pool
• default autorelease pool created by AppKit
• life cycle = event cycle
• You can create your own autorelease pool
• Don’t over use autorelease
Saturday, April 9, 2011
Problems
• Memory Leak
• Over-release
Saturday, April 9, 2011
Rules
You only release or autorelease
objects you own
• If you own the object by alloc, copy or
retain, you have to release or autorelease
• If the object is not owned by you, don’t call
release or autorelease
Saturday, April 9, 2011
Pitfalls
• Implicit Onwership
• Circular Reference
Saturday, April 9, 2011

开发高质量的iOS应用 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数44
  • 收藏数0 收藏
  • 顶次数0
  • 上传人橘子
  • 文件大小1.53 MB
  • 时间2021-10-07