Skip to content

Commit

Permalink
fix memory leak caused by strong self reference (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
thirteenthstep authored Oct 24, 2020
1 parent 82e184a commit c0492dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Classes/MapboxMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma
super.init()

channel = FlutterMethodChannel(name: "plugins.flutter.io/mapbox_maps_\(viewId)", binaryMessenger: registrar.messenger())
channel!.setMethodCallHandler(onMethodCall)
channel!.setMethodCallHandler{ [weak self] in self?.onMethodCall(methodCall: $0, result: $1) }

mapView.delegate = self

Expand Down

0 comments on commit c0492dc

Please sign in to comment.