iPhone - SKProductsRequest and "message sent to deallocated instance"
<p>I got troubles implementing InAppPurchase. My implementation of purchase is in modal view controller (AppUpgradeViewController), that I present from another modal view. I do it like this:</p>

<pre><code>AppUpgradeViewController * appUpgradeViewController = [[AppUpgradeViewController alloc] init];
appUpgradeViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
appUpgradeViewController.delegate = self;
[self presentModalViewController:appUpgradeViewController animated:YES];
[appUpgradeViewController release];
</code></pre>

<p>Then, in my upgrade view I do the following:</p>

<pre><code>[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
NSSet *productIdentifiers = [NSSet setWithObject:kInAppPurchaseProUpgradeProductId];
self.productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
self.productsRequest.delegate = self;
[productsRequest start];
</code></pre>

<p>Then I have implemented </p>

<pre><code>- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
</code></pre>

<p>where I do:</p>

<pre><code>[self.productsRequest release];
</code></pre>

<p>and then I have other required methods.</p>

<p>The problem is when I show modal, and quickly dismiss it then after few seconds i got the following on console (I turned on NSZombieEnabled):</p>

<pre><code>*** -[AppUpgradeViewController respondsToSelector:]: message sent to deallocated instance 0x2e91f0
</code></pre>

<p>I suppose that it's something with that product request, but I don't know how to debug or fix it. It seems that the answer for request comes to this controller just after it's dismissed (and deallocated), but I don't know how to prevent it from receiving messages after dismiss/dealloc.
Thanks for any help!</p>
