Re: class variables
Re: class variables
- Subject: Re: class variables
- From: Keith Duncan <email@hidden>
- Date: Tue, 20 Feb 2007 22:05:16 +0000
If you only need the array in one method then you can put the static
definition inside your sorting method and alloc it in there if it is
nil. That way you can avoid polluting the global namespace. Otherwise
a class method would be best.
- Keith
On 19 Feb 2007, at 14:08, Jim Thomason wrote:
I've got a list of useful data I need to use stored in an NSArray.
Just a list of strings (class names) in a particular order, which I
need to use for sorting purposes. I originally just had my sort method
constantly re-allocate and subsequently destroy this array
every...single...time. Not the right way to do it, but it's
conceptually easy. Now it's time to clean it up.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden