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.24k stars 4.61k forks source link

Using GPUImage on ios10 memory leaks #2386

Open jiangxk2015 opened 8 years ago

jiangxk2015 commented 8 years ago

I use the pod import GPUImage,code: `NSURL url = [[NSBundle mainBundle] URLForResource:@"test" withExtension:@"mp4"]; _movieFile = [[GPUImageMovie alloc] initWithURL:url]; _movieFile.runBenchmark = YES; _movieFile.playAtActualSpeed = NO; _filter = [[GPUImageSepiaFilter alloc] init]; [_movieFile addTarget:_filter]; NSString path = [NSString stringWithFormat:@"%@/%@",[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0],@"filterVideo.mp4"]; unlink([path UTF8String]); _movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:[NSURL fileURLWithPath:path] size:CGSizeMake(640, 480)]; [_filter addTarget:_movieWriter]; _movieWriter.shouldPassthroughAudio = YES; _movieFile.audioEncodingTarget = _movieWriter; [_movieFile enableSynchronizedEncodingUsingMovieWriter:_movieWriter]; [_movieWriter startRecording]; [_movieFile startProcessing]; __weak typeof(self) weakSelf = self; [_movieWriter setCompletionBlock:^{ [weakSelf movieRecordingCompleted]; }];

zmzhuai commented 7 years ago

The memory leak is fix here #2413