Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIImage Memory leak #71

Open
dx777 opened this issue May 5, 2021 · 2 comments
Open

CIImage Memory leak #71

dx777 opened this issue May 5, 2021 · 2 comments

Comments

@dx777
Copy link

dx777 commented May 5, 2021

@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 dx777 changed the title Potential memory leak ? CIImage Memory leak May 6, 2021
@dx777
Copy link
Author

dx777 commented May 6, 2021

This is a demo project:
CabbageDemo.zip

Screenshot 2021-05-07 at 00 47 25

@JarlenJohn
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants