title: Autoreleasing objects created in a thread and passed to another in objective-C
body: <p>I have a method of an object which creates objects which are then passed to a method of another object in another thread, like this:</p>
  
  <pre><code>MyClass* myClass = [[MyClass alloc] init];
  [anotherClass performSelectorOnMainThread:@selector(method) withObject:myClass waitUntilDone:NO];
  </code></pre>
  
  <p>in method, I immediately retain the object, supposing it will be somehow released by the creator. My question is: how do I make MyClass release that object correctly? Is this the correct way to go?</p>
  
  <p>My solution was to release the object manually in method. I see anyway that the Leak analyzer still recognizes this as a leak and seems it is not what Apple recommends, as the owner has the responsability to release the object.</p>
  
  <p>Can you explain me the correct way to handle this situation? Thanks!</p>