Maximum amount of objects in NSArray

前端 未结 6 530
耶瑟儿~
耶瑟儿~ 2020-12-11 04:19

What is the largest amount of objects I can put in my NSArray?

6条回答
  •  执念已碎
    2020-12-11 05:06

    NSNotFound is defined as NSIntegerMax (this value changes if you are on a 32bit or 64bit system)

    NSNotFound is also the result you get when you do a

    [nsarray indexOfObject:obj]

    and no object is found.

    If you do not run out of space/memory I would say that this would be your limit.

    http://developer.apple.com/library/mac/#documentation/cocoa/reference/foundation/Miscellaneous/Foundation_Constants/Reference/reference.html

提交回复
热议问题