Skip to main content
Samsung Developer Program

Terminating Commercial Item Processing

In order to release the resources used by the Open IAB Billing service and event listeners, add the following routine to your Android project source code. 

To prevent memory leaks or free memory, dispose of the OpenIabHelper previously created by onCreate().

MainActivity.java
public void onDestroy() {
    super.onDestroy();
            // very important:
    Log.d(TAG, "Destroying helper.");
    if (mHelper != null) mHelper.dispose();
    mHelper = null;
}

 

  • Was this article helpful?