PC Review


Reply
Thread Tools Rate Thread

How to dispose a XDocument?

 
 
shapper
Guest
Posts: n/a
 
      15th Mar 2010
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
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      15th Mar 2010
On 14-03-2010 20:12, shapper wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If my System.IO.StreamWriter Write method throws "The specified network name is no longer available." and I try to Dispose or Close it in the finaly clause the close or dispose method just throws "The specified network name is no longe Daniel Microsoft Dot NET Framework 1 8th Sep 2005 04:11 AM
use of MySQLConnection.dispose and/or MySQLCommand.dispose Antonio Concepcion Microsoft ASP .NET 3 17th Feb 2005 07:33 PM
Dispose or not dispose ? =?Utf-8?B?S2V2ZW4gQ29yYXp6YQ==?= Microsoft Dot NET Compact Framework 1 29th Dec 2004 11:45 AM
Sub Dispose or Implementing the Dispose Interface? Scott M. Microsoft VB .NET 7 21st Oct 2004 11:52 PM
OracleTransaction.dispose: rollback on dispose? =?Utf-8?B?S2V2aW4gU3dhbnNvbg==?= Microsoft ADO .NET 1 13th Oct 2004 02:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:21 PM.