We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words and memory usage

I have a Word 2003 document, its size is 44,8 Mb.
A very simple code in my application starts using about 130 Mb of memory on my PC:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim _Document As Aspose.Words.Document
_Document = New Aspose.Words.Document("000002.7.doc")
_Document = Nothing
End Sub

When the code is executed I expect garbage collector to remove all unused memory but to my surprise it doesn’t. Also I can’t find any method of Document object which can dispose it.
Could you please help me to solve the problem?
Thank in advance.


Thank you for your inquiry. There are no explicit methods to free resources after you finished using a Document object. Since it utilizes only memory .NET Framework will handle resources automatically. You can invoke garbage collector by your own accord to control this process a bit better. This is standard approach in .NET and you can find recommendations on when to call it on the Internet.
Best regards,