Skip to main content

Memory Management

  • Chapter
Learn Objective-C on the Mac

Abstract

Next on our plate is memory management using Objective-C and Cocoa (yum!). Memory management is part of a more general problem in programming called resource management. Every computer system has finite resources for your program to use. These include memory, open files, and network connections. If you use a resource, such as by opening a file, you need to clean up after yourself (in this case, by closing the file). If you keep on opening files but never close them, you’ll eventually run out of file capacity. Think about your public library. If everyone borrowed books but never returned them, eventually the library would close because it would have no more books, and everybody would be sad. Nobody wants that.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Scott Knaster, Waqar Malik, Mark Dalrymple

About this chapter

Cite this chapter

Knaster, S., Malik, W., Dalrymple, M. (2012). Memory Management. In: Learn Objective-C on the Mac. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4189-8_9

Download citation

Publish with us

Policies and ethics