We are currently leveraging Aspose.Words in our service to convert DOCX files to HTML. we have encountered significant memory usage issues, especially when dealing with larger documents.
When converting a document of 2.5MB (resulting in an 83MB document.xml), Aspose.Words allocates approximately 3GB of memory. This has caused our service to frequently run out of memory, particularly when handling multiple simultaneous requests. Additionally, when requests time out and an OperationCanceledException is thrown, we face out-of-memory errors more often.
Our Questions:
- Is there a way to explicitly dispose of
Documentobjects? We have not found aDisposemethod available on theAspose.Words.Documentclass. - What are the best practices for managing memory when using Aspose.Words for high-load services?