In my application I need to put some c-struct-like data into an NSMutableArray
.
After some research I found that the most suggested solution is to wrap the struct into NSValue
and insert that into the array.
What about creating a custom subclass of NSObject
with some properties to match the fields of the struct and insert that into the array?
NSValue is a subclass of NSObject so the overhead in term of performance and memory shouldn't be huge. Am I missing something obvious?