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.

GlobalCEFApp.Free hangs

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

Re: GlobalCEFApp.Free hangs

Post by salvadordf »

Hi,

You need to close all the browsers before closing your app following the "destruction sequence" described in the code comments.
Some demos have a slightly different sequence. Please read the comments from the demo that you used as a template for your application.

For example, the MiniBrowser demo do this before closing the form :
  • 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
  • 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
  • 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: GlobalCEFApp.Free hangs

Post by salvadordf »

If there are some threads or processes remaining then it means that there's some destruction sequence step missing.

Use the SimpleBrowser2 demo as a base for your application and add your drag and drop functions to that demo.

The SimpleBrowser demo works fine but SimpleBrowser2 follows the CEF3 recommendations to the letter.
SimpleBrowser2 has the destruction sequence that I copied in my previous post.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: GlobalCEFApp.Free hangs

Post by salvadordf »

Thank you so much Frans for your donation!!!! :D

I wish I had the eloquence to express how happy I am for this.
Thank you very much for supporting this open source project.
Post Reply