albert-heijn-technology / apple_maps_flutter

Apple Maps Plugin for Flutter
BSD 2-Clause "Simplified" License
69 stars 74 forks source link

Memory leak while using in list view #13

Closed nuzelac closed 3 years ago

nuzelac commented 3 years ago

Hi,

Thanks for making this plugin, it works great as a drop in replacement for google maps and apple maps are more performant on my old test iPhone.

I had a memory leak while displaying a bunch of maps in a list view. While scrolling, memory keeps growing until iOS kills it at 1.3GB+. Looks like old map widgets are never disposed.

Turns out this change applied to apple_maps_flutter fixes the issue: https://github.com/Unact/yandex_mapkit/commit/5ba2585f3f1837ab6520fd5f1faa46f022f8f835#diff-81b47307a81ee1170b367b6920b91830c3371d0012f8a54a737c8e7bf828d08bR30-R34

I have a fix in my repo but I don't know enough Swift to do it properly :D

s20797 commented 3 years ago

hi nuzelac have you know about how to take screenshot like google_map_flutter