AVAssetImageGenerator leaking memory

When I generate an image from a ProRes Codec asset, the instrument shows the memory leak.

If I switch the asset into H264 one, no leaking.


Here is my simple code.


let testURL = URL(fileURLWithPath: "Pat_To_Movie_file")
let asset = AVAsset(url: testURL)
let avAssetImageGenerator = AVAssetImageGenerator(asset:asset)
avAssetImageGenerator.appliesPreferredTrackTransform = true
do {            
     let cgImage = try avAssetImageGenerator.copyCGImage(at: CMTimeMake(value: 0, timescale: 1), actualTime: nil)
} catch let error as NSError {
     print(error)
}


I really appreciate all your help.


My spec is MacOS 10.15.4 and Xcode Version 11.5.


Thanks!

Replies

Here is a screenshot of "Instruments".

Very small leaks and seems like this problem comes from ************.


https://drive.google.com/file/d/1v4EzDk7LsxM00hteD3AzSjRwv_SXwQiY/view?usp=sharing

Please file a bug report for this issue