Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

How can i destroy the browser?

User avatar
Uefi1
Posts: 43
Joined: Tue Aug 24, 2021 1:58 pm

Re: How can i destroy the browser?

Post by Uefi1 »

None of these codes work and PostMessage (Handle, WM_CLOSE, 0, 0); closes with the form
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How can i destroy the browser?

Post by salvadordf »

Try the demos without any modifications in your computer.

If you find any issue please tell us but if the demos work correctly then it means that there's some piece of code that was not copied to your application.
User avatar
Uefi1
Posts: 43
Joined: Tue Aug 24, 2021 1:58 pm

Re: How can i destroy the browser?

Post by Uefi1 »

Please write the code of the function of destruction and release or on the button make and paste here
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How can i destroy the browser?

Post by salvadordf »

It's not that simple.

CEF requires you to follow several destruction steps and that's why you need to read the code comments in the demos.
The code you ask is not a single function but several calls, messages and events that you can find in the demos.
User avatar
Uefi1
Posts: 43
Joined: Tue Aug 24, 2021 1:58 pm

Re: How can i destroy the browser?

Post by Uefi1 »

Can you just write the CODE cleanly with destruction and allocation without unnecessary overhead here with all the steps?
Student
Posts: 73
Joined: Tue Aug 07, 2018 9:20 am

Re: How can i destroy the browser?

Post by Student »

I will share my personal observations, to free up the resources of the necessary chromium instance, it is enough to send a request to Tchromium.closebrowser, and then check Tchromium.Initialized in a timer or in a separate thread, as it became = false, then you destroy TCEFWindow. After that, you can create a new TCEFWindow and initialize Chromium through Chromium.CreateBrowser
Post Reply