Closing browser without waiting for CEF close messages

Post Reply
lasaranza
Posts: 7
Joined: Tue Feb 25, 2020 8:27 am

Closing browser without waiting for CEF close messages

Post by lasaranza » Tue Mar 24, 2020 5:36 pm

Hi,

I am using dcef4 without using the package. I use the components TCEFChromium and TCEFWindowParent and set a form as the owner and parent of the components. I tried not assigning the OnClose and OnBeforeClose events and just close the browser at the destruction time of the form. I did not encounter problems so far. Now, I just wanted to know if this method is also ok?

Thank you for any extra information.

User avatar
salvadordf
Posts: 2223
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Closing browser without waiting for CEF close messages

Post by salvadordf » Tue Mar 24, 2020 7:14 pm

You need to follow the "destruction steps" given in the code comments of the demo you used as a template for your application. You only need to implement the TChromium.OnClose and TChromium.OnBeforeClose events.

Otherwise, your application could crash in some situations.

lasaranza
Posts: 7
Joined: Tue Feb 25, 2020 8:27 am

Re: Closing browser without waiting for CEF close messages

Post by lasaranza » Thu Mar 26, 2020 2:57 pm

Ok. Thank you for your answer.

Post Reply