Unable to delete cache_path directory after CefShutdown()

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Unable to delete cache_path directory after CefShutdown()

Postby smayoral » Wed Jan 10, 2018 9:10 am

Hi,
I use for cache_path following directory:

...\AppData\Roaming\innovaphone\myApps\chromium\cache

after calling CefShutdown() I tried to delete all files inside following cache directory ...\AppData\Roaming\innovaphone\myApps\chromium\cache\Cache
data_0
data_1
data_2
data_3
index

but Windows DeleteFile function returns ERROR_ACCESS_DENIED. Sometimes I also see ERROR_SHARING_VIOLATION (being used by another process)

Only after my app is completely closed I can delete the files in Windows Explorer.

Am I missing something closing CEF?

Best regards,
Sergio

CefRefPtr<ClientApp> client = new ClientApp();

CefInitialize(mainArgs, cefSettings, client, NULL);

// Run the CEF message loop. This will block until CefQuitMessageLoop() is called.
CefRunMessageLoop();

// Shut down CEF.
CefShutdown();

// Delete Cache Path Directory
smayoral
Techie
 
Posts: 39
Joined: Wed Jan 10, 2018 8:58 am

Re: Unable to delete cache_path directory after CefShutdown(

Postby Czarek » Thu Jan 25, 2018 4:30 am

After the call to CefShutdown are you still keeping references to CEF objects? Are there any warnings/errors in debug.log?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 59 guests