initWithCapacity:
is declared in NSMutableArray
, but I want to use it to initialize an NSArray
. I there any solution?
Since NSArray
objects are immutable (cannot change the objects they contain) there's no use in adjusting the capacity of NSArray
s.
The capacity is the number of objects an array can contain without reallocating memory. It is only used for optimization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With