Item Details

Print View

Pro Multithreading and Memory Management for iOS and OS X [electronic resource]

Kazuki Sakamoto, Tomohiko Furumoto
Format
EBook; Book; Online
Published
New York : Apress, [2012]
Language
English
ISBN
1430241160, 9781430241164
Summary
If you want to develop efficient, smooth-running applications, controlling concurrency and memory are vital. Automatic Reference Counting is Apple's game-changing memory management system, new to Xcode 4.2. Pro Multithreading and Memory Management for iOS and OS X shows you how ARC works and how best to incorporate it into your applications.
Contents
  • Machine generated contents note: ch. 1 Life Before Automatic Reference Counting
  • Reference Counted Memory Management Overview
  • Exploring Memory Management Further
  • You Have Ownership of Any Objects You Create
  • You Can Take Ownership of an Object Using retain
  • When No Longer Needed, You Must Relinquish Ownership of an Object You Own
  • Implementing alloc, retain, release, and dealloc
  • The alloc Method
  • The retain Method
  • The release Method
  • The dealloc Method
  • Apple's Implementation of alloc, retain, release, and dealloc
  • Autorelease
  • Automatic Variables
  • Implementing autorelease
  • Apple's Implementation of autorelease
  • Summary
  • ch. 2 ARC Rules
  • Overview
  • Reference Counting Mechanism Changes
  • Ownership qualifiers
  • ___strong ownership qualifier
  • ___weak ownership qualifier
  • ___unsafe_unretained ownership qualifier
  • ___autoreleasing ownership qualifier
  • Rules
  • Forget About Using Retain, Release, RetainCount, or Autorelease
  • -- Contents note continued: Forget About Using NSAIlocateObject or NSDeallocateObject
  • Follow the Naming Rule for Methods Related to Object Creation
  • Forget About Calling dealloc Explicitly
  • Use @autoreleasepool Instead of NSAutoreleasePool
  • Forget About Using Zone (NSZone)
  • Object Type Variables Cannot Be Members of struct or union in C Language
  • ìd' and v̀oid*' Have to Be Cast Explicitly
  • Property
  • Array
  • ch. 3 ARC Implementation
  • Calling the array method
  • Inside the array Method
  • Looking Under the Hood When an Object Is Discarded
  • Assigning a Newly Created Object
  • Adding to autorelease pool Automatically
  • Reference Count
  • ch. 4 Getting Started with Blocks
  • Blocks Primer
  • Anonymous functions
  • Variables
  • Blocks to the Rescue
  • Block Literal Syntax
  • Block type variables
  • -- Contents note continued: Capturing automatic variables
  • ___block specifier
  • Captured automatic variables
  • ch. 5 Blocks Implementation
  • Under the Blocks' Hood
  • Converting Source Code
  • this in C++ and self in Objective-C
  • Declaring _cself
  • Constructor of___main_block_impl_O struct
  • Initializing___main_block_impl_O instance
  • Reviewing _NSConcreteStackBlock
  • Capturing Automatic Variables
  • Anonymous Function
  • Writable Variables
  • Static or Global Variables
  • Memory Segments for Blocks
  • A Block as NSConcreteGlobalBlock Class Object
  • Block on the Heap
  • Copying Blocks Automatically
  • Coping Blocks Manually
  • Copying Block Multiple Times
  • Memory Segments for ___block Variables
  • ___forwarding
  • Capturing Objects
  • When You Should Call the "copy" Method
  • ___block Variables and Objects
  • Circular Reference with Blocks
  • Copy/Release
  • ch. 6 Grand Central Dispatch
  • Grand Central Dispatch Overview
  • -- Contents note continued: Multithreaded Programming
  • How a CPU Executes an Application
  • Advantages and Disadvantages of Multithreaded Programming
  • ch. 7 GCD Basics
  • Dispatch Queues
  • Two Types of Dispatch Queue
  • Serial Dispatch Queue
  • Concurrent Dispatch Queue
  • Obtaining Dispatch Queues
  • dispatch_queue_create
  • Main Dispatch Queue/Global Dispatch Queue
  • Controlling Dispatch Queues
  • dispatch_set_target_queue
  • dispatch_after
  • Dispatch Group
  • dispatch_barrier_async
  • dispatch_sync
  • dispatch_apply
  • dispatch_suspend/dispatch_resume
  • Dispatch Semaphore
  • dispatch_once
  • Dispatch I/O
  • ch. 8 GCD Implementation
  • Dispatch Queue
  • Kernel-Level Implementation
  • GCD Structure
  • Global Dispatch Queue and pthread_workqueue
  • Executing Blocks
  • Dispatch Source
  • Example Using Dispatch Source
  • Appendix A Example of ARC, Blocks, and GCD
  • Appendix B References
  • References for ARC
  • -- Contents note continued: Transitioning to ARC Release Notes
  • ARC Programming Guide by Apple
  • LLVM Document
  • -Automatic Reference Counting
  • Advanced Memory Management Programming Guide
  • Getting Started: Building and Running Clang
  • objc4 version 493.9
  • GNUstep libobjc2 version 1.5
  • References for Blocks
  • Apple's Extensions To C
  • Blocks Proposal, N1451
  • Presentation About Blocks
  • Language Specification for Blocks
  • Block Implementation Specification
  • libclosure version 53
  • plblocks
  • References for Grand Central Dispatch
  • libdispatch version 187.5
  • Libc version 763.11
  • xnu version 1699.22.81
  • libdispatch project page
  • libdispatch Porting Project.
Description
Mode of access: World wide Web.
Notes
Includes index.
Technical Details
  • Access in Virgo Classic
  • Staff View

Availability

Read Online