On Jul 1, 2008, at 2:36 PM, Andy Lee wrote:
The struct approach is bad because you can't actually do the memory management right in the general case. For example you can copy a struct using assignment -- myStructOne = myStruct2 -- and now you have increased the number of references to the strings inside the structs, but you haven't retaining those strings an extra time. Similarly if you pass a struct by value as an argument to a function or method.
For the record, I just realized this reasoning doesn't make sense. Your retain/release logic would be no more or less hairy than when you assign one pointer to another, or pass a pointer argument to a method or function.
Ignoring this mental lapse, I still say the object approach generally makes more sense.
--Andy _______________________________________________ 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 [EMAIL PROTECTED]