Browse Source

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

zhongbaojian 5 years ago
parent
commit
9a000a18cd
1 changed files with 4 additions and 0 deletions
  1. 4 0
      SuperShow/UI/Template/WSSTemplateDetailViewController.swift

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

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