[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Unloading XML file from DOM

  • To: xml-dev@l...
  • Subject: RE: Unloading XML file from DOM
  • From: Ashish Goyal <ashishgoyal_26@y...>
  • Date: Mon, 7 Jan 2002 13:13:17 -0800 (PST)
  • In-reply-to: <FBCE6C0E0C75D4119AF100508BB010BB0584AE62@m...>

unload xml
Yeah..I did the same thing..I called Release() and
then again CoCreateInstance() but nothing happened..I
think there is memory leaks  in MSXML ..
I guess I have to live with it.. :(
There is no KB also for this at microsoft site..
--- david.hunter@m... wrote:
> [Replying off-list]
> 
> You don't need to unload the previous document.  As
> soon as you call load()
> or loadXML(), whatever is currently in the DOM will
> be unloaded
> automatically, before MSXML tries to load the new
> document.  If you have
> memory leaking, I don't think this is your problem.
> 
> Alternatively, if you really want to make sure, you
> can simply kill your
> reference to the DOMDocument object as soon as
> you're done with it, and
> create a new one when needed.  For example, in VB
> syntax you might do
> something similar to this:
> 
> Public Sub Blah()
>     Dim xdDoc As MSXML2.DOMDocument
>     
>     Set xdDoc = New MSXML2.DOMDocument
>     xdDoc.async = False
>     xdDoc.Load "url"
>     
>     'work with the data
>     
>     'when you're done with the data, get rid of the
> DOMDocument object
>     Set xdDoc = Nothing
>     
>     'when you need to load more data, instantiate a
> new DOMDocument object
>     Set xdDoc = New MSXML2.DOMDocument
>     xdDoc.async = False
>     xdDoc.Load "new url"
>     
>     'work with the new data
>     
>     'when you're done with the data, get rid of the
> object again
>     Set xdDoc = Nothing
>     
>     'etc.
> End Sub
> 
> *Depending on the type of code you're writing*,
> killing COM objects as soon
> as you're done with them *can* improve scalability.
> 
> David Hunter
> Senior Architect
> ViaFone
> Author:  Beginning XML
> david.hunter@m...
> http://www.mobileq.com
> 
> 
> -----Original Message-----
> From: Ashish Goyal [mailto:ashishgoyal_26@y...]
> 
> Sent: Saturday, January 5, 2002 12:35 AM
> To: xml-dev@l...
> Subject:  Unloading XML file from DOM 
> 
> 
> Hi ALl,
>   I am loading a XML file in my program and I am
> using
> load() method but I could not find method to unload
> the file. I am loading various file and therefore
> needs to unload the previous files. Without this my
> memory usage goes very high. Any help would be
> great..I am using MSXML 3.0 with SP2 on WIN2000.
> 
> Thanks
> Ashish
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
>
-----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an initiative
> of OASIS <http://www.oasis-open.org>
> 
> The list archives are at
> http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the
> subscription
> manager: <http://lists.xml.org/ob/adm.pl>


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.