Cabbage icon indicating copy to clipboard operation
Cabbage copied to clipboard

CIImage Memory leak

Open dx777 opened this issue 3 years ago • 2 comments

@vitoziv I faced this problem in the project I'm working on. After I create CIImage, it prevents VideoComposition from releasing from the memory, causing the memory leak.

            let url = Bundle.main.url(forResource: "overlay", withExtension: "jpg")!
            let image = CIImage(contentsOf: url)!
            let resource = ImageResource(image: image, duration: CMTime.init(seconds: 5, preferredTimescale: 600))

Any suggestions?

dx777 avatar May 05 '21 23:05 dx777

This is a demo project: CabbageDemo.zip

Screenshot 2021-05-07 at 00 47 25

dx777 avatar May 06 '21 21:05 dx777

I find this code in your demo, let assets = Array(repeating: asset, count: 6) there are 6 same object, each address is same, may be caused by it.

JarlenJohn avatar Aug 27 '21 02:08 JarlenJohn