Media Player album artwork images do not release memory after loading so memory accumulates, eventually impacting performance and causing crashes.
Steps To Reproduce:
- Download example project and run on device
- Grant access to library of 100+ albums
- Scroll through albums on any tab screen
- Observe steady memory increase in Xcode debug navigator and crash as you scroll
- Observe same memory accumulation on other screens that use different methods to get album artwork images
Observations:
Various methods of obtaining album artwork insufficiently release memory and impact app performance.
- 1 - Artwork Image releases memory sometimes if the images are small and you scroll slow, but app will still accumulate memory, drop frames when scrolling, and eventually crash.
- 2 - Value For Property behaves similar to Artwork Image even when using the implicit size of the artwork bounds.
- 3 - Image From Disk problem seems related to perform() method since you can remove UIImage and memory still accumulates
- All 3 methods result in higher retain counts than expected for artwork objects that could be preventing memory from releasing