Document Close?



In using Aspose Word after I save a document using is there any way I can make sure that the handle for a file is released, like a Document Close command or something.

Aspose i guess does not release the handle of the file immediately?

Thanks in advance for the help.


If you pass a file name, then the Document class opens and closes the file automatically. The Document class opens the file in the constructor, loads it fully into memory and closes it. Also, the Document class creates a file when you call Save and then closes it when Save returns.

If you pass a Stream object to load or save a document, then Aspose.Word does not close the stream as it regards that your code "owns" the stream.

split this topic #4

A post was split to a new topic: The process cannot access the file because it is being used by another process