Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

iOS external texture causes OOM #10321

Closed
wants to merge 1 commit into from
Closed

Conversation

WATER1350
Copy link
Contributor

@WATER1350 WATER1350 commented Aug 1, 2019

IOSExternalTextureGL use fml::CFRef to release an old CVPixelBufferRef and reference a new CVPixelBufferRef. However, if the new CVPixelBufferRef has same memory address as the old, the old one will not be released though they contain different data. This bug causes serious memory leak when using video plugin supported by external texture. @chinmaygarde Would you please take a look at this?

@cbracken
Copy link
Member

@WATER1350 if this is safe to do, then we should really remove the buffer_ref_ private field on the class and just use it as a local.

It looks like OnGrContextCreated also calls CreateTextureFromPixelBuffer, which relies on buffer_ref_, applying this change would change the behaviour if that were called with a non-null buffer_ref_. @chinmaygarde can you provide some insight here?

@WATER1350 WATER1350 closed this Aug 22, 2019
@WATER1350 WATER1350 reopened this Aug 22, 2019
@WATER1350
Copy link
Contributor Author

WATER1350 commented Aug 22, 2019

Is there any reason for us to retain the pixelBuffer in buffer_ref_ private field on the class? @cbracken

@cbracken
Copy link
Member

Thanks for your contribution! Closing, since I believe this has been superseded by #10326.

@cbracken cbracken closed this Sep 16, 2019
@WATER1350
Copy link
Contributor Author

Thanks for your contribution! Closing, since I believe this has been superseded by #10326.

They're not related

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

Successfully merging this pull request may close these issues.

3 participants