BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.2k stars 4.61k forks source link

Memory Leak #2594

Open Rahish opened 5 years ago

Rahish commented 5 years ago

Hello Team GPUImage ,

@BradLarson currently I'm facing memory issue, where whenever I am going to implement any filter on a video having a size around 60 to 80mb or more, then the code will crash and I'll get this message "Message from debugger: Terminated due to memory issue".

xiaoqingq commented 5 years ago

我也是遇到了这个问题,在代理方法didOutputSampleBuffer 中调用代理时遇到的,怎么解决呢? 内存泄漏定位在: [self.delegate willOutputSampleBuffer:sampleBuffer] 这行代码

    CFRetain(sampleBuffer);
    runAsynchronouslyOnVideoProcessingQueue(^{
        //Feature Detection Hook.
        if (self.delegate)
        {
            [self.delegate willOutputSampleBuffer:sampleBuffer];
        }

        [self processVideoSampleBuffer:sampleBuffer];

        CFRelease(sampleBuffer);
        dispatch_semaphore_signal(frameRenderingSemaphore);
    });