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

Memory Increasing on returing back to GPUImagePicture class #2322

Closed wraza0116 closed 6 years ago

wraza0116 commented 8 years ago
UIImage *resizedImage = [image resizedsizeImageForWidth:_widthOfSuperView forHeight:_heightOfSuperView];

self.sourcePicture = [[GPUImagePicture alloc] initWithImage:resizedImage smoothlyScaleOutput:YES];

[self.view addSubview:self.image];
[self.sourcePicture addTarget:self.filter];
[self.filter addTarget:self.image];
[self.sourcePicture processImage];

I have three controller when I push to second controller where I had use GPUImagePicture for effect and then push to third controller so memory not releasing second controller ... when again pop to second controller so still memory increasing with 6 to 8 MB. So it increased till 256 MB and then crash.

So please suggestme what I have to do?

SimonCY commented 8 years ago

i got the same problem. After GPUImageFilterPipeline filtering 72 images,the memory didn't releasing.

wraza0116 commented 8 years ago

I try to find out solution for this problem but not releasing memory by this Framework. So I resize image as per aspect ratio of 500px by using Accelerate Framework and it store at file system when need to use so get from file system. When i push to second controller to third so I set "nil" UiImage.

So I now my app using at 20 to 30 MB at all time.