rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

App Crash when open/close camera multiple times. #384

Open TwinkleMali opened 7 years ago

TwinkleMali commented 7 years ago

Hi, My app is crashing as i open/close camera multiple times. I am receiving following crash error:

Message from debugger: Terminated due to memory issue

If i am not initialize camera session , and open/close camera view, app is not crashing but as i uncomment camera session initlize method , and try to open/cliose camera multiple time, app is crashing due to memory issue.

Can you please suggest me where i am going wrong.

Jawwnie commented 7 years ago

not knowing what your app is, its hard to tell. But i presume you have initialised a seperate viewcontroller as your initial. And have pushed/dismissed the camera from this view. Which kinda stacks memory wen the camera is loaded since it is the root view on this source code.

twomedia commented 7 years ago

Try adding the following code to your camera view controller and add a breakpoint inside. See if it gets called when dismissing the view controller:

- (void) dealloc
{
    [super dealloc];
}

If it doesn't then that means there is something causing the View Controller to be retained in memory.

khush004 commented 5 years ago

@TwinkleMali Did you found any solution?