microsoft / MapsSDK-Native

This repository contains samples, documentation and releases history for the Bing Maps SDK for Android and iOS.
MIT License
40 stars 23 forks source link

Multiple memory leaks #36

Closed jim-mcandrew closed 3 years ago

jim-mcandrew commented 4 years ago
Screen Shot 2020-05-06 at 2 37 50 PM

Describe the bug If I repeatedly set the path property on a MSMapPolyline (10x per second), the app memory slowly increased (1-2mb / sec).

Steps to reproduce

  1. Create an MSMapPolyline and add it to the map
  2. Create a Timer at 0.1s interval
  3. Set the path property in the timer callback with a new MSGeopath with an increasing number of positions
  4. Watch your memory footprint increase

Expected behavior Either have a way to append positions to the path, or free up the memory from previously updated paths.

Screenshots

Screen Shot 2020-05-06 at 2 37 50 PM

Device and SDK information (please complete the following):

Additional context None

jim-mcandrew commented 4 years ago

Did I little more investigation, and it seems like there is another, possibly more severe memory issue with calling mapView.setScene (10x / sec), especially with camera angles that are near the horizon.

JuanPapas commented 4 years ago

Thanks for reporting the issue @jim-mcandrew. At the moment we are working on fixes for a few other memory leaks. We'll make sure to include these scenarios in our investigation.

jim-mcandrew commented 4 years ago

Thanks! We are deciding if we want to release our app as-is, or if we should wait for your fixes. Any idea on the timeframe?

JuanPapas commented 4 years ago

We are planning to release the next version with the memory leaks fixed at the end of May. No promises yet, but we'll see if we can accelerate that for next week.

JuanPapas commented 4 years ago

We are happy to announce that the latest SDK v1.1.4 includes important improvements around memory usage (peak memory) on iOS. We are not done by any means, and I want to assure you that we'll continue working on making it better.

Hopefully all is well with the release of your application @jim-mcandrew!