Closed lucas-kakele closed 7 months ago
If the buffer is not closed, I believe a memory leak is occurring, and GC runs frequently (once every a few seconds in the device I tested, iPhone 7).
Empirically, I tried using "close" and also "release". The first one did the trick.
This change is also based on the documentation that mentions the buffer should be released after use: https://developer.apple.com/documentation/avfoundation/avplayeritemvideooutput/1386148-copypixelbufferforitemtime#return_value
If the buffer is not closed, I believe a memory leak is occurring, and GC runs frequently (once every a few seconds in the device I tested, iPhone 7).
Empirically, I tried using "close" and also "release". The first one did the trick.
This change is also based on the documentation that mentions the buffer should be released after use: https://developer.apple.com/documentation/avfoundation/avplayeritemvideooutput/1386148-copypixelbufferforitemtime#return_value