Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

Creating large PST results in java.lang.OutOfMemoryError

$
0
0
Kashif,

I work with Aaron and I am working on this issue now.  The first thing I'd like to do is confirm that you can reproduce a memory leak I am seeing, when using the OutputStream as the first input to PersonalStorage.create method, instead of the String file path.  Can you please try your code again using a BufferedOutputStream/FileOutputStream instead of the String as shown below?  And when you run using 10k+ messages, can you confirm that the heap usage grows steadily, with an instance of com.aspose.email.ms.System.IO.f holding onto a reference to a very large byte array?

final OutputStream fileOutputStream = new BufferedOutputStream(new FileOutputStream("D:/LargeOutput.pst"), 8192);

PersonalStorage pst = PersonalStorage.create(fileOutputStream, 0);


Viewing all articles
Browse latest Browse all 1367