Growth(TP-15388): Added unbind() to avoid Memory leaks (#4957)
* Growth(TP-15388): Added unbind() to avoid Memory leaks * Code fix Co-authored-by: shubham-icpcw9 <shubham.patwarika@gmail.com>
This commit is contained in:
committed by
GitHub Enterprise
parent
2cd6a3b43e
commit
a3a4a58c5b
@@ -527,6 +527,11 @@ class DigitalGoldBuyActivity : BaseActivity(), WidgetCallback, NewBottomSheetLis
|
||||
pgRepaymentStatus(description, data)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
private fun pgRepaymentStatus(
|
||||
description: String?,
|
||||
data: PaymentData?,
|
||||
|
||||
@@ -348,6 +348,7 @@ class DigitalGoldHomeActivity : BaseActivity(), WidgetCallback, NewBottomSheetLi
|
||||
super.onDestroy()
|
||||
timer?.cancel()
|
||||
timer = null
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -520,6 +520,11 @@ class DigitalGoldSellActivity : BaseActivity(), WidgetCallback, NewBottomSheetLi
|
||||
handleBackPress()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val CLOSE = "CLOSE"
|
||||
}
|
||||
|
||||
@@ -138,6 +138,11 @@ class DigitalGoldSellFragment : BaseFragment(), WidgetCallback {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "sellScreen"
|
||||
fun getInstance() = DigitalGoldSellFragment().apply { }
|
||||
|
||||
@@ -129,6 +129,11 @@ class DigitalGoldSellUpiFragment : BaseFragment(), WidgetCallback {
|
||||
binding.shimmerLayout.isVisible = false
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
override fun getLifeCycle(): Lifecycle = lifecycle
|
||||
|
||||
override fun widgetUserData(key: String, value: Any) {
|
||||
|
||||
@@ -123,6 +123,11 @@ class DigitalGoldTransactionActivity : BaseActivity(), WidgetCallback {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
|
||||
override val screenName: String = DIGITAL_GOLD_TRANSACTION_SCREEN
|
||||
|
||||
|
||||
@@ -522,6 +522,7 @@ class NewDashboardActivity :
|
||||
if (::updateInAppDialog.isInitialized) {
|
||||
updateInAppDialog.safelyDismissDialog()
|
||||
}
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?) {
|
||||
|
||||
@@ -819,6 +819,11 @@ class HomeFragment : PaymentBaseFragment(), WidgetCallback, PlayStoreActionListe
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "HOME"
|
||||
fun newInstance(bundle: Bundle?): HomeFragment {
|
||||
|
||||
@@ -267,6 +267,11 @@ class ReferralHomeActivity : BaseActivity(), WidgetCallback {
|
||||
})
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val APP_SHARE_IMAGE_FILE_NAME = "image.png"
|
||||
}
|
||||
|
||||
@@ -317,6 +317,11 @@ class LoginFragment : BaseFragment(), View.OnClickListener {
|
||||
fragmentStateListener = null
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
override val screenName: String
|
||||
get() = NaviAnalytics.PHONE_NUMBER
|
||||
|
||||
|
||||
@@ -217,6 +217,11 @@ class RewardDelightActivity : BaseActivity(), ActionButtonClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val KEY_REWARD_INFO = "KEY_REWARD_INFO"
|
||||
const val MESSAGE_TEXT = "MESSAGE_TEXT"
|
||||
|
||||
@@ -186,6 +186,11 @@ class RewardsAnnouncementFragment :
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
binding.unbind()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "RewardsAnnouncementFragment"
|
||||
private const val KEY_REWARDS_ANNOUNCEMENT_DATA = "KEY_REWARDS_ANNOUNCEMENT_DATA"
|
||||
|
||||
@@ -53,4 +53,9 @@ abstract class BaseDialogFragment<T : ViewDataBinding>(
|
||||
if (isResumed)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
binding.unbind()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user