Page 1 of 1

Empty Folders in AppData\Local\Temp\PDFXEdit.SDK are not deleted

Posted: Wed Jul 10, 2019 7:32 am
by AteBe
Hallo,
every time we open a new pdf by using the API in AppData\Local\Temp\PDFXEdit.SDK a new PDFXEdit.SDK-folder is created.
They all start with pdfx- and contain 3 files (2 -tmp with size 512kb and 256 kb and one called pdfx.lck with size 0 kb).
Created Folders.png
Created Files in Folder.png
Created Files in Folder.png (11.46 KiB) Viewed 1650 times
The folders and files keep existing during runtime even when we explicitly closed the opened document via API.

When shutting down the application (and therefore PDFXChangeEditor), the files within the directories are deleted, but the directories themselves keep existing.

The same problem was described in the entry viewtopic.php?f=62&t=30164&p=119380&hil ... er#p119380 unfortunately without a solution.

So what do I have to do, so that these temporary folders are deleted/released after closing a document, showing a new document or at least after closing the application.

AteBe

Re: Empty Folders in AppData\Local\Temp\PDFXEdit.SDK are not deleted

Posted: Thu Jul 11, 2019 6:45 am
by Sasha - Tracker Dev Team
Hello AteBe,

These folders will be deleted after the next SDK launch. There can be a situation where we try to delete these folders but someone still holds them thus we cannot remove them when closing for sure. But we clean them up when the SDK is being launched - thus there won't be any overhead. As the Java holds the objects, like we are talking in the other thread, the temp files can still be in use and Windows won't remove the folder itself on close.

Cheers,
Alex

Re: Empty Folders in AppData\Local\Temp\PDFXEdit.SDK are not deleted

Posted: Mon Jul 15, 2019 8:00 am
by AteBe
Hello Alex,

after stopping our application, Java will also be shut down and all files will be released.
The evidence for this is that I can use the Explorer to delete the remaining empty folders.

According to your statement, these folders should be deleted when I restart the SDK.
This is not the case. Although the folders are no longer locked, they are not deleted.

Is there a function or a setting that I have to call or set additionally, so that the folders are deleted?

AteB

Re: Empty Folders in AppData\Local\Temp\PDFXEdit.SDK are not deleted

Posted: Wed Jul 17, 2019 1:02 pm
by Sasha - Tracker Dev Team
Hello AteBe,

I have investigated this deeper - it seems that when you exit the program by breaking the debug the folders are not being removed. Also, the SDK does not delete folders in the Temp folder and it should have done that - that's the problem on our side.

Cheers,
Alex

Re: Empty Folders in AppData\Local\Temp\PDFXEdit.SDK are not deleted

Posted: Fri Sep 20, 2019 7:44 am
by AnKeilha
Is there a ticket (i.e. RT#) for this?

Re: Empty Folders in AppData\Local\Temp\PDFXEdit.SDK are not deleted

Posted: Tue Sep 24, 2019 6:54 am
by Sasha - Tracker Dev Team
Hello AteBe,

Removal of this folder is not that simple, because simultaneous controls can be launched in the system and they can even be a part of the different applications (one PC can have multiple products that use our AX Control - we had such a situation). And all of them share the same temporary folder - thus we can't simply remove that folder as someone else might be using it.

Cheers,
Alex