A project to demonstrate memory problems that occur when accessing album artwork using 3 Media Player framework methods.
- Grant media library access
- Scroll through ~100+ albums
- Observe steady memory increase in Xcode Debug navigator and crash as you scroll and new artwork is loaded
- Artwork Image releases memory sometimes if the images are small and you scroll slow, but will still accumulate memory to the point of dropping frames when scrolling.
- Value For Property behaves similar to Artwork Image even when using the implicit size of the artwork bounds.
- 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
- Use MediaPlayer framework to get artwork images (not MusicKit)
- Release artwork memory so that scrolling is smooth and app does not crash