Clear tmp files erases all tmp directory instead of Apose files only

Hi,
We are using Apose PDF for creating RTF files on linux machines. We are using ‘clear’ command that erases the temp files after the rtf creation but seems it not just deleting Apose tmp files but important files that we are using for different biz threads on the same machine.
Pls fix this ASAP.
Thanks,
Eyal

@eyalsadeh

Can you please share your complete sample code snippet of conversion and clearing the temporary files? We will log an investigation ticket and share the ID with you. Please also share which version of the Linux are you using.

The linux version is:

bash-4.2# cat /etc/*release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
Amazon Linux release 2 (Karoo)

Using:
implementation 'com.aspose:aspose-pdf:23.9'
implementation 'com.aspose:aspose-words:23.9:jdk17'

Using the clear() command - clears heap memory from static APOSE PDF instances.

@eyalsadeh

We are checking it and will get back to you shortly.

@eyalsadeh

You may configure separate temp folder for aspose process adding the property before starting main code:

System.setProperty("java.io.tmpdir", "D:/tmp");

Also, you can clear temp files (that are not blocked by JVM) during working web application calling internal temp files cleaner each time when your process with document conversion was completely finished and result was saved.

MemoryCleaner.clearAllTempFiles(); 

Please let us know if it helps.

We cant since the tmp is used by other threads in the same time.

@eyalsadeh

If possible, can you please share the piece of code that can be used as a sample to replicate the issue in our environment? We will log an investigation ticket and share the ID with you.

Just using clear method, nothing special

@eyalsadeh

Sure. However, we just need the code that you are using for the conversion for our reference. Also, you are calling the clear method at the end of conversion operation? Right?