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.
1
fun cleanup()
kotlin
copy
Example
123456789
class CheckoutActivity : AppCompatActivity() { // ... private fun cleanupUniversalCheckout() { // 👇 Add this Primer.instance.cleanup() }}
kotlin
copy