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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights 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
DOI: https://doi.org/10.1007/978-1-4302-4189-8_9
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4188-1
Online ISBN: 978-1-4302-4189-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books