I would like to execute a function which obtains a struct in an separate Thread but not sure how to pass the struct right.
Having this:
- (void) workOnSomeData:(struct MyData *)data;
How to properly call:
struct MyData data = ... ;
[[[NSThread alloc] initWithTarget:self selector:@selector(workOnSomeData:) object: ...
Using &data
does not work.