开发者

NSArray sortedArrayUsingSelector

开发者 https://www.devze.com 2023-01-10 15:30 出处:网络
I have NSMutableArray that i need to sort . to do so i use sortedArrayUsingSelector this f开发者_如何学Pythonunction return me NSArray with the objects sorted.

I have NSMutableArray that i need to sort . to do so i use sortedArrayUsingSelector this f开发者_如何学Pythonunction return me NSArray with the objects sorted.

my question is: if i want to sort the original array again do i need to release the previous sorted list that i got or just to sort it again ??

thanks


The original an array and sorted array (the array that gets created by get created from sortedArrayUsingSelector) are different objects. So yes, if you won't use the 'previous sorted list' again, release it.

0

精彩评论

暂无评论...
验证码 换一张
取 消