From e07859d73a343b8050721cbceabc2d19025393be Mon Sep 17 00:00:00 2001 From: Mufakkharul Islam Nayem Date: Mon, 31 Jan 2022 11:37:20 +0600 Subject: [PATCH] Do resource deallocation in deinit of YPPickerVC instead of viewWillDisappear(_:) --- Source/YPPickerVC.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/YPPickerVC.swift b/Source/YPPickerVC.swift index ac0a49241..edf2da290 100644 --- a/Source/YPPickerVC.swift +++ b/Source/YPPickerVC.swift @@ -192,7 +192,11 @@ open class YPPickerVC: YPBottomPager, YPBottomPagerDelegate { open override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) shouldHideStatusBar = false + } + + deinit { stopAll() + ypLog("YPPickerVC deinited ✅") } @objc