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:
- Download and run the example on CarPlay.
- Select the Settings tab.
- Click the first item in the list "Use Apple Music".
- Click Back button.
- Repeat steps 3 and 4 several times.
- 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.