TAILIEUCHUNG - Advanced Memory Management Programming Guide

Application memory management is the process of allocating memory during your program’s runtime, using it, and freeing it when you are done with it. A well-written program uses as little memory as possible. In Objective-C, it can also be seen as a way of distributing ownership of limited memory resources among many pieces of data and code. When you have finished working through this guide, you will have the knowledge you need to manage your application’s memory by explicitly managing the life cycle of objects and freeing them when they are no longer needed. Although memory management is typically considered at the level of an individual. | Advanced Memory Management Programming Guide Developer Contents About Memory Management 4 At a Glance 4 Good Practices Prevent Memory-Related Problems 5 Use Analysis Tools to Debug Memory Problems 6 Memory Management Policy 7 Basic Memory Management Rules 7 A Simple Example 8 Use autorelease to Send a Deferred release 8 You Don t Own Objects Returned by Reference 9 Implement dealloc to Relinquish Ownership of Objects 10 Core Foundation Uses Similar but Different Rules 11 Practical Memory Management 12 Use Accessor Methods to Make Memory Management Easier 12 Use Accessor Methods to Set Property Values 13 Don t Use Accessor Methods in Initializer Methods and dealloc 14 Use Weak References to Avoid Retain Cycles 15 Avoid Causing Deallocation of Objects You re Using 16 Don t Use dealloc to Manage Scarce Resources 17 Collections Own the Objects They Contain 18 Ownership Policy Is Implemented Using Retain Counts 19 Using Autorelease Pool Blocks 20 About Autorelease Pool Blocks 20 Use Local Autorelease Pool Blocks to Reduce Peak Memory Footprint 21 Autorelease Pool Blocks and Threads 23 Document Revision History 24 2012-07-17 2012 Apple Inc. All Rights Reserved. 2 Figures Practical Memory Management 12 Figure 1 An illustration of cyclical references 15 2012-07-17 2012 Apple Inc. All Rights Reserved.

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.