Call this method to dispose of the listener and free Primer SDK resources, which will also avoid memory leaks. Once this occurs, you can call the configure method again as the Primer instance will be in a clean state.

KOTLIN
fun cleanup(cleanClientSessionCache: Boolean = true)

Parameters

Example

KOTLIN
class CheckoutActivity : AppCompatActivity() {
  // ...

  private fun cleanupUniversalCheckout() {
    // 👇 Add this
    Primer.instance.cleanup()
  }
}