Pro multithreading and memory management for iOS and OS X
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 ho...
Autor principal: | |
---|---|
Otros Autores: | |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
New York :
Apress
2012.
|
Edición: | 1st ed. 2012. |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009628493506719 |
Tabla de Contenidos:
- Title Page; Copyright Page; Contents at a Glance; Table of Contents; About the Author; About the Translator; About the Technical Reviewers; Acknowledgments; Introduction; Preface; Who This Book Is For; Chapter 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; Relinquishing Ownership of a Retained Object; Relinquishing Ownership of a Retained Object
- Returning a New Object Without OwnershipYou Must Not Relinquish Ownership of an Object You Don't 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; Chapter 2: ARC Rules; Overview; Reference Counting Mechanism Changes; Ownership qualifiers; __strong ownership qualifier; Assigning to __strong ownership qualified variables
- How the strong reference works__weak ownership qualifier; Circular Reference; Self Reference; Weak Reference Disappears; __unsafe_unretained ownership qualifier; __autoreleasing ownership qualifier; Compiler Cares __autoreleasing Automatically; Returning a Result as the Argument; __strong and __weak; Rules; Forget About Using Retain, Release, RetainCount, or Autorelease; Forget About Using NSAllocateObject 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; 'id' and 'void*' Have to Be Cast Explicitly; __bridge cast; __bridge_retained cast; __bridge_transfer cast; CFBridgingRetain function; CFBridgingRelease function; Property; Array; Summary; Chapter 3: ARC Implementation; __strong ownership qualifier; Calling the array method; Inside the array Method; __weak ownership qualifier; Looking Under the Hood When an Object Is Discarded; Assigning a Newly Created Object; Immediate Disposal of Objects; Adding to autorelease pool Automatically
- __autoreleasing ownership qualifier__unsafe_unretained ownership qualifier; Reference Count; Summary; Chapter 4: Getting Started with Blocks; Blocks Primer; Anonymous functions; Variables; Blocks to the Rescue; Block Literal Syntax; Block type variables; Capturing automatic variables; __block specifier; Captured automatic variables; Summary; Chapter 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_0 struct; Initializing __main_block_impl_0 instance; Reviewing _NSConcreteStackBlock
- Capturing Automatic Variables