How to dispose a XDocument?

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I am loading a few XDocuments to read, write, etc.

After using the XDocument can't I dispose it? I think I should or not?
I was looking for it and XDocument does not have a Dispose method.

Thanks,
Miguel
 
I am loading a few XDocuments to read, write, etc.

After using the XDocument can't I dispose it? I think I should or not?
I was looking for it and XDocument does not have a Dispose method.

There are no need for it.

XDocument only contains some data structures in managed memory.

And that can be GC'ed - so no need for any Close/Dispose call.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top