Converting NSArray Contents to a varargs (With ARC) For Use With NSString initWithFormat

前端 未结 6 922
广开言路
广开言路 2021-02-19 13:43

We have some code today that takes an NSArray and passes it as a argument list to -[NSString initWithFormat:arguments] and we\'re trying to get this to work with ARC. Here\'s th

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-19 14:27

    The only thing you need to do is remove the autorelease.

    You're malloc'ing and free'ing yourself - ARC doesn't care about that.

提交回复
热议问题