Milan patel
Milan patel

Reputation: 223

Terminated App due to memory pressure While creating Video ios

I am create the video using the Array of images . If I select more than 40 images from gallery it gives the Error:Terminated App Due to memory pressure I am use CVPixelBufferRef to create the Video.

When I create the video At that time memory will increase otherwise it is 9 or 10 MB.

Note : I am use ARC.

enter image description here

After the creating the video it does not release the memory.

I found the memory leaks in this project please help me..

Memory Leak Image

Upvotes: 0

Views: 335

Answers (1)

Divyesh Dobariya
Divyesh Dobariya

Reputation: 125

You do not release your buffer in your code. Now you insert the below code.

CVPixelBufferPoolRef bufferPool = adaptor.pixelBufferPool;
            NSParameterAssert(bufferPool != NULL);
            CVPixelBufferRelease(buffer);

This code insert under the

        append_ok = [adaptor appendPixelBuffer:buffer withPresentationTime:frameTime];

I hope this will help you for release the memory

Upvotes: 1

Related Questions