Closed gerwindehaan closed 4 years ago
Core Graphics is often not auto-releasing (e.g CGContext), so I would look for strategic single-usage of the CGContext etc, or resort to placement of sections into @autoreleasepool
I noticed that also yesterday! Yah I'm sure I have a core graphics memory management bug in there. You're probably right that it's something about my drawing code.
I think I fixed in https://github.com/johnboiles/coremediaio-dal-minimal-example/commit/f416ff014e98e74afb53be7640e9ff46307dbf3b
I'm testing on my end and so far so good, but if you had a moment i'd love a double check.
I can confirm it has worked for me!
Yes, fix confirmed!
Woohoo!
I am experimenting with consuming the virtual stream from my own MacOS app, and notice the memory consumption grows alarmingly quickly when active. Within a minute you'd reach ~2GB. After disabling my own changes (swift bridge to draw an animated shape to "prove" this is live), I still got it, and likewise in other apps. E.g. this can be reproduced by viewing the stream through QuickTime Player and observing that Apps' memory consumption. When I have time I can dig in a bit myself, although my Obj-c is virtually non-existent.