Happy Birthday to Denise’s new baby! Cheers to newborn child (Do we know your name yet? Did your parents heed Peter Biddle’s three rules for naming a child?), to Mom and Dad, and best wishes for an exciting holiday season.
Posted by AKMA at November 28, 2003 04:01 PM | TrackBackEarlier I mentioned that variables can live in two different places. We're going to examine these two places one at a time, and we're going to start on the more familiar ground, which is called the Stack. Understanding the stack helps us understand the way programs run, and also helps us understand scope a little better.
Posted by: Wymond at January 13, 2004 01:35 AMWhen a variable is finished with it's work, it does not go into retirement, and it is never mentioned again. Variables simply cease to exist, and the thirty-two bits of data that they held is released, so that some other variable may later use them.
Posted by: Paschall at January 13, 2004 01:35 AMFor this program, it was a bit of overkill. It's a lot of overkill, actually. There's usually no need to store integers in the Heap, unless you're making a whole lot of them. But even in this simpler form, it gives us a little bit more flexibility than we had before, in that we can create and destroy variables as we need, without having to worry about the Stack. It also demonstrates a new variable type, the pointer, which you will use extensively throughout your programming. And it is a pattern that is ubiquitous in Cocoa, so it is a pattern you will need to understand, even though Cocoa makes it much more transparent than it is here.
Posted by: David at January 13, 2004 01:35 AM