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
 
Back
Top