diff --git a/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift b/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift index 6fb9a1be..4bfa9e75 100644 --- a/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift +++ b/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift @@ -21,6 +21,10 @@ 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