Not just Actionscript noodlings

14 Mar

Design Then Code

So as well as doing alot of Facebook based Flash games (seems to be all the rage since The Social Media film), I have been working hard honing my iPhone dev skills. This has taken the form of building an app with Nitzan, but more of that once it’s live.

I have read many books and used the Apple provided docs, but I just wanted to post up a link to Design Then Code. I have only just started reading this free resource (there are paid tutorials too) but this one piece of information is just gold and something I’ve been struggling with for a while now

When working with variables that have an explicit, set size at compile time, they’re stored on the stack. The stack stores local information and you can access its data without pointers. Primitive data types (int, char, float, etc.) have a defined, maximum size so they’re stored on the stack.

In Obj-C, objects don’t have a maximum size (they can grow as much as you need them to) so their memory must be dynamically allocated on the heap and referenced with pointers. A pointer is an address in memory, and to access what’s actually stored in that memory position, you dereference the pointer to get at its contents.

When learning any knew language, getting to understand the underlying processes helps immeasurably.

No Response Filed under: iOS, iphone