I need to configure a different cache folder for each instance of the form so I put these lines in the OnCreate event.
Code: Select all
GlobalWebView2Loader := TWVLoader.create(self);
GlobalWebView2Loader.UserDataFolder := ExtractFileDir(Application.ExeName) +
'\Cache'+inttostr(lista_id);
GlobalWebView2Loader.StartWebView2;
Apparently it worked but when I instantiate two or more forms and then close the forms and then the program, a memory leak occurs as shown in the attached image.
In CEF4 I use:
Code: Select all
TempContext := TCefRequestContextRef.New(ExtractFilePath(application.ExeName) + 'cache\cache' + inttostr(lista_id),'', '', false, false, false)