diff --git a/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift b/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift index 4bfa9e75..b5f2ef62 100644 --- a/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift +++ b/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift @@ -21,10 +21,6 @@ public class HeadlessInAppWebView : FlutterMethodCallDelegate { self.channel?.setMethodCallHandler(self.handle) } - deinit { - dispose() - } - public override func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { let arguments = call.arguments as? NSDictionary @@ -96,4 +92,9 @@ public class HeadlessInAppWebView : FlutterMethodCallDelegate { HeadlessInAppWebViewManager.webViews.removeValue(forKey: id) flutterWebView = nil } + + deinit { + print("HeadlessInAppWebView - dealloc") + dispose() + } }