Update: is there still no (java) dispose() API for freeing Document memory?

This is just a follow up to a very old thread:

Apparently there was no dispose() API to free any memory in the Document class 9 years ago. Just verifying that there is still no need to free memory after creating and using a Document object.

(Context: The Aspose slides, pdf, and cells java libs all have a dispose() method, just the words lib doesn’t).

@thegg,

Thanks for your inquiry. Objects will be cleaned up when they are no longer being used and when the garbage collector sees fit. Sometimes, you may need to set an object to null in order to make it go out of scope but overall there is usually no need to set to null.

When the document is closed, all the DOM data is purged from memory during the next garbage collector cycle. Please note that the memory may not be released until you close the application.