Temporary file left in Temp-folder
By Olli Kämäräinen 1 decade ago
Code is using EmbeddedObject.getInputStream() to read pdf file. This method creates temporary file named eo########tm to users temp-folder. In my case files were found in:
C:\Documents and Settings\User\Local Settings\Temp
From Designer Help:
"EmbeddedObject.getInputStream creates a temporary file. The file is deleted when EmbeddedObject is recycled."
So.. quick fix is to add following lines after line "byte[] data = bos.toByteArray();":
bos.close();// closes ByteArrayOutputStream
is.close();// closes FileInputStream
file.recycle();// recycles EmbeddedObject and removes temporary file
I'll fix this in next release that'll come out soon. Next version is mostly focused on memory management.