SCRecorder icon indicating copy to clipboard operation
SCRecorder copied to clipboard

App Crash when open/close camera multiple times.

Open TwinkleMali opened this issue 8 years ago • 3 comments

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.

TwinkleMali avatar Feb 17 '17 12:02 TwinkleMali

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.

Jawwnie avatar Feb 27 '17 04:02 Jawwnie

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.

twomedia avatar Feb 27 '17 04:02 twomedia

@TwinkleMali Did you found any solution?

khush004 avatar Jan 25 '19 04:01 khush004