Page 3 of 3
Re: How to create and destroy browser form?
Posted: Fri Jul 03, 2020 8:15 pm
by andreykrasnodar
If I put this string
in my project after
it hangs the program on exit, but after closing the application there is no application in task manager.
Re: How to create and destroy browser form?
Posted: Fri Jul 03, 2020 9:29 pm
by andreykrasnodar
Hope I fix the bug using code from demo's:
Code: Select all
CefSingleProcess := false;
if not CefLoadLibDefault then
Exit;
suddenly no errors more. I hope.
Re: How to create and destroy browser form?
Posted: Sat Jul 04, 2020 7:43 am
by salvadordf
You need to close the browsers following the "destruction steps" described in the code comments of each demo.
It's necessary to close all the browsers properly before destroying GlobalCEFApp.
If you see remaining processes when you close the application, freezes or crashes when you try to destroy GlobalCEFApp, it means that some browser or some other CEF component wasn't properly closed.
Re: How to create and destroy browser form?
Posted: Sat Jul 04, 2020 8:04 am
by salvadordf
Also remember that the single process mode is not supported by CEF and it should only be used for debugging purposes.
It can cause unexpected issues.
Re: How to create and destroy browser form?
Posted: Sat Jul 04, 2020 8:06 am
by andreykrasnodar
You're wrong again.
I am using cef3 and is going to use it in the future. There is no GlobalCEFApp in this version. And only shortest instructions in demo. All demo's create 3 process and start with
Code: Select all
CefSingleProcess := false;
if not CefLoadLibDefault then
Exit;
If CefSingleProcess := false (default) application creates only 1 process and not able to terminate as well on closing main window.
I have added this code into my dpr file and now there are no problems.
Thanks.