I would think that

[itemBrowserArrayCTRL removeAllObjects];

would be your best. By calling arrangedObjects and feeding it to removeObjects:, you're causing your array to sort all 15000 entries before it removes them individually.

HTH
Jeff
On Mar 24, 2008, at 10:16 AM, Martin Linklater wrote:

HI. I have an NSArrayController which has over 15000 entries. When I clear the array using

[itemBrowserArrayCTRL removeObjects:[itemBrowserArrayCTRL arrangedObjects]];

it takes a long time... like 10+ seconds on my MacBook Pro.

Is there a quicker way of clearing the contents ?
_______________________________________________

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]

Reply via email to