我正处于应用程序错误修复和优化的最后阶段。我正在调试应用程序中的泄漏。现在只有导致泄漏UIKitCore
的系统库。有什么可以做的吗?
那个奇怪的uikeyboardpredictionview
导致怀疑是main
函数中的泄漏
我的main
函数非常简单
import UIKit
import RxSwift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var service: MovieService!
let disposeBag = DisposeBag()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let service = MovieService(provider: TMDBprovider)
let tabBarController = window?.rootViewController as! UITabBarController
let popularMovieNavi = tabBarController.viewControllers?.first as! UINavigationController
let popularMovieVC = popularMovieNavi.viewControllers.first as! PopularMovieVC
popularMovieVC.viewModel = PopularMovieViewModel(service: service)
let searchMovieNavi = tabBarController.viewControllers?.last as! UINavigationController
let searchMovieVC = searchMovieNavi.viewControllers.first as! SearchMovieVC
searchMovieVC.viewModel = SearchMovieViewModel(service: service)
return true
}
b是否可以解决该错误?