I have search the forum and issue boards in search of how to correctly implement the lifecycle handling in CEF.
I have modelled the lifecycle handling based off of the CefSimple App and still this pops up 70% of the time.
All I do is start the application, let the page load and close the window.
I can verify that the the browser object is destroyed and all the delegate handling is in place.
I have made sure that:
- - No references to CefBrowser are kept around
- Code: Select all
NSArray *subviews = [[window contentView] subviews];
Class cefBrowserHostViewClass = NSClassFromString(@"CefBrowserHostView");
for (NSView *view in subviews) {
if ([view isKindOfClass:cefBrowserHostViewClass]) {
[view removeFromSuperview];
break;
}
}
- Make sure all active requests are cancelled after CefRunMessageLoop() exits. I also call CefDoMessageLoopWork() 10x to make sure any pending actions are taken.
- I even added the following code on DoClose (take from https://code.google.com/archive/p/chromiumembedded/issues/1203)
I'm running out of ideas here. Has anyone else had any success with this?