# How to "unload" a xml?

**URL:** <https://forum.kirupa.com/t/how-to-unload-a-xml/275995>\
**Category:** Uncategorized\
**Created:** [November 21, 2008, 2:04am UTC](https://forum.kirupa.com/t/how-to-unload-a-xml/275995 "2008-11-21T02:04:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [November 21, 2008, 2:04am UTC](https://forum.kirupa.com/t/how-to-unload-a-xml/275995/1 "2008-11-21T02:04:56Z")

</div>

[SIZE=3][FONT=Times New Roman]Hi…[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]I am using this code to load text from a xml file[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman] [/FONT][/SIZE]

```auto

[SIZE=3][FONT=Times New Roman]XML.prototype.ignoreWhite = true;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]var audiolist_xml = new XML();[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]audiolist_xml.load("total.xml");[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]audiolist_xml.onLoad = function(success) {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] if (success) {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] eachTrack = this.firstChild.childNodes;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] _global.totalTracks_streets = eachTrack.length;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] trace("inside");[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] m_total_songs = totalTracks;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] trace(_global.totalTracks_streets);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] var i = 0;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] [/FONT][/SIZE][SIZE=3][FONT=Times New Roman] ….[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]};[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] 

```

[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman] [/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]So it is loaded… The question is: how to UNLOAD it when I don’t need it anymore and by doing this, free some memory that I need to use…[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman] [/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Thanks a lot,[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Cheers.[/FONT][/SIZE]  
[FONT=‘Times New Roman’]Leo.[/FONT]
