gpt4 book ai didi

objective-c - 要创建一个空字典,[NSMutableDictionary dictionary] 或 [[NSMutableDictionary alloc] init]?

转载 作者:太空狗 更新时间:2023-10-30 03:15:24 26 4
gpt4 key购买 nike

要创建一个空字典,我应该调用 [NSMutableDictionary dictionary] 还是 [[NSMutableDictionary alloc] init]

有什么区别?

最佳答案

[NSMutableDictionary dictionary][[[NSMutableDictionary alloc] init] autorelease] 相同

关于objective-c - 要创建一个空字典,[NSMutableDictionary dictionary] 或 [[NSMutableDictionary alloc] init]?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4152322/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com