Stanford’s “iPhone Application Programming” Third Lecture

April 16, 2009

I’ve been watching Stanford’s class on iPhone Application Programming. This is the third of a series of posts regarding these lectures, which began here.

I just watched this third lecture(iTunes link), given by Evan Doll. The lecture is great if you don’t have out-of-school experience with memory management (and Obj-C). This is actually my case, and fortunately I was looking forward to have an opportunity to begin working with it. From this perspective, it was good to see that Obj-C, iPhone version, doesn’t have garbage collection.

I guess most of the memory management will be taken care by the pool’s autorelease. If that is the case, and manual handling is only needed with more particular situations, I believe the the language can be productive (and help people write better apps). I guess one will only be sure about the frequency of use of each technique by actually using the language. Can any experienced Obj-C developer talk about this? Go for it in the comments section, and thank you for sharing.

Well, although this was a fine talk for me, the lecture seems too focused on ‘things that you will do offen’ and less on the internals of the language and platform. There were a number of questions that stood unanswered. Examples:

  • Does something happen under the hood if I call ‘dealloc’ directly?
  • What is the meaning of assigning something to ‘self’?

I’m sure there were others: If someone remembers any, just post on the comments. I’m gonna try to look for the answers and post here another day.

I’m not saying that don’t going deep is a bad thing — not at all, it allows people to focus — but I think many people will want to go a little deeper.

Note: Lecture four is already on Stanford Channel on iTunes U. Download it here(iTunes link).


2 Responses to “Stanford’s “iPhone Application Programming” Third Lecture”

  1. Rox Says:

    >>Does something happen under the hood if I call ‘dealloc’ directly?
    If dealloc was already called, the pointer has an invalid value, and sending a message to this invalid object can’t be good. I don’t know how they handle this (as an exception and the app crashes) or as ignore it, but it seems to me that it’s easy to avoid this.

    As for the autorelease pool, I understood that it should be used when creating temporary objects to be returned by functions, and that the regular retain/release should be used when several objects need to access one other object.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: