On 21 Dec 2008, at 10:52 am, Steve Wetzel wrote:
I guess can simply assign the pointer, but if I do, it seems to me I will need an NSMutableArray to hold myObj1... myObj10 (or more). If I do that, what benefit is the stack?
I don't really follow your argument. Presumably you decided you need a stack for some reason to do with your application's logic - so I can't answer "what benefit is the stack?" - that's up to you!
A stack in general terms doesn't inherently copy items placed on it, there's nothing in the definition of 'stack' that implies a copy. It's just storage, with a LIFO semantic.
I don't really see what creating objects has do with it - the stack is to do with organising objects, not creating them.
--Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com