We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DOCIO WordDocument

Thread ID:





116969 Jul 11,2014 01:57 PM UTC Jul 15,2014 01:05 PM UTC WinForms 3
Tags: DocIO
Asked On July 11, 2014 01:57 PM UTC


I',m using WordDocument as mailmerge generator  within loop inside windows service

How i should properly dispose worddocument instance ?
There is no dispose method or IDisposable interface implemented.

Now i create one instance per loop.
Should i share only one for all loops. If so, how properly cleanup worddocument befor every loop.

What do you suggest ?

Thanks for advance.


Nithya B [Syncfusion]
Replied On July 14, 2014 01:02 PM UTC

Hi Edvin,

Thank you for using Syncfusion products.

In the DocIO DOM we have reference properties in each element to preserve the parent, child relation between all the document elements. Whereas in Close() method we have explicitly unlink the child elements from its parent element by removing the reference to the parent element and clear all the child elements from parent’s child collection. This operation is required specifically to remove references of all the instances used by DocIO DOM, in order to ensure no instance is referred anywhere/alive in the current scope and the used resources can be freed.


Kindly invoke Close() method of WordDocument class to free the resources used  by each WordDocument instance. Please find the code snippet below for your reference.



//Releases the resources used by the WordDocument instance.





'Releases the resources used by the WordDocument instance.


Let me know if you have any questions.




Replied On July 15, 2014 09:47 AM UTC

Thanks for explanation.


Nithya B [Syncfusion]
Replied On July 15, 2014 01:05 PM UTC

Hi Edvin

Thanks for update.

Please let us know if you have any other questions.





This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon