Memory leak in CarPlay when using CPTabBarTemplate

Memory leak in CarPlay when using CPTabBarTemplate

Reproduced using the code example "Integrating CarPlay with Your Music App" from the official Apple documentation - https://developer.apple.com/documentation/carplay/integrating-carplay-with-your-music-app

Steps to reproduce the leak:

  1. Download and run the example on CarPlay.

  1. Select the Settings tab.

  1. Click the first item in the list "Use Apple Music".

  1. Click Back button.
  2. Repeat steps 3 and 4 several times.
  3. Open Debug Memory Graph in xCode and search for "CPGridTemplate" - the count will be greater than 0.

Conditions under which the memory leak disappears:

If you open and switch to all tabs one by one, the leak disappears.

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include a sysdiagnose and test project, and post the FB number here once you do.

Hopefully this helps.

Rico
Car Experience - Software Engineer

Memory leak in CarPlay when using CPTabBarTemplate
 
 
Q