Kaynağa Gözat

fix 模板详情页内存泄露问题

zhongbaojian 5 yıl önce
ebeveyn
işleme
9a000a18cd

+ 4 - 0
SuperShow/UI/Template/WSSTemplateDetailViewController.swift

@@ -94,6 +94,10 @@ class WSSTemplateDetailViewController: MTViewController {
             // App失去焦点
             self?.videoPause()
         }
+        NotificationCenter.default.reactive.notifications(forName: Notification.Name.kEditVideoFinish).take(duringLifetimeOf: self).observeValues { [weak self] _ in
+            self?.releaseObjects()
+        }
+        
 
         // ---
         videoContainer.appendTemplateModels(templateList)