On Thu, Aug 7, 2008 at 10:28 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > Because class methods other than +new return autoreleased objects, which > makes non-GC memory management a little bit easier.
This isn't very accurate statement (for a few reasons) ... IMHO it would be better left unstated. > On Aug 7, 2008, at 11:08 AM, Lee, Frederick wrote: > >> 1) why use instantiated objects versus classes (via class methods)? One example... you could make a method a class method if the method didn't have to access any instance related variables (ivars). In other words it could operate on the data you pass it as parameters without having to have any storage of its own (ignoring the possible use of function static vars). Good way (as others noted) to make available utility code that is not instance specific in a nicely name spaced fashion. I suggest looking around the Cocoa framework API documentation at all of the class methods it provides for a better idea of when / why you could use one. -Shawn _______________________________________________ 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]