title: [AppCommons respondsToSelector:]: message sent to deallocated instance
body: <p>AppCommons.h</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import &lt;StoreKit/StoreKit.h&gt;
  
  @interface AppCommons : NSObject &lt;SKProductsRequestDelegate,SKRequestDelegate&gt;
  - (void) getInAppPrice : (NSString *) inAppIdentifier;
  @end
  </code></pre>
  
  <p>AppCommons.m</p>
  
  <pre><code>#import "Config.h"
  #import "AppCommons.h"
  #import "AppDelegate.h"
  #import "ASIHTTPRequest.h"
  #import "ASIFormDataRequest.h"
  
  
  @implementation AppCommons
  SKProductsRequest *productsRequest;
  
  
  - (void) getInAppPrice : (NSString *) inAppIdentifier {
      NSSet *productIdentifiers = [NSSet setWithObject:inAppIdentifier ];
      productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
      productsRequest.delegate = self;
      [productsRequest start];
  
      // we will release the request object in the delegate callback
  }
  
  #pragma mark -
  #pragma mark SKProductsRequestDelegate methods
  
  - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
  {
      for(SKProduct *product in response.products)
      {
          NSLog(@"Product Price : %@",product.price);
                  NSLog(@"Product Price Locale : %@",product.priceLocale);
      }
  }
  
  @end
  </code></pre>
  
  <p><i>This is my class to get the cost of an in app purchase.</i> I am calling <b>getInAppPrice</b> method from another class using the below lines</p>
  
  <pre><code>AppCommons *appCommon = [[AppCommons alloc] init];
  [appCommon getInAppPrice:inAppProductIdentifier];
  </code></pre>
  
  <p><i> I am getting following error when response is received</i> </p>
  
  <p><b> "<em>*</em> -[AppCommons respondsToSelector:]: message sent to deallocated instance 0xd4f0580</b></p>
  
  <p>Please help .. Thank you.</p>