阅读背景:

NSNumber是否为其保留的数字添加任何额外字节?

来源:互联网 

I'm working with Objective-C and I need to add int's from a NSArray to a NSMutableData (I'm preparing a to send the data over a connection). If I wrap the int's with NSNumber and then add them to NSMutableData, how would I find out how many bytes are in the NSNumber int? Would it be possible to use sizeof() since according to the apple documentation, "NSNumber is a subclass of NSValue that offers a value as any C scalar (numeric) type."? I'm working with Objective-C and I need to add




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: