Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I still need to learn about managing memory now that Objective-C/Cocoa has Garbage collection?

So I finally dusted off my Objective-C/Cocoa books.. turns out they are nearly 7 years old! With Objective-C 2.0 now having garbage collection, how important are the chapters on Memory Management?

How much of a difference has Garbage Collection made?

like image 368
revs Avatar asked Dec 19 '08 20:12

revs


1 Answers

Memory management is still really important to understand. If you're targeting an older OS, you need to do memory management. If you're using an older library, you need to do memory management. If you drop down to the Core Foundation level, you (may or may not) need to do memory management.

If you're programming for iPhone, you need to do memory management.

The garbage collector in Objective-C is outstanding - and if you can be using it, you most definitely should be - but it just doesn't cover every programming situation yet.

like image 120
Jim Puls Avatar answered Oct 02 '22 16:10

Jim Puls