# RemoveChild(); and loader.unload();

**URL:** <https://forum.kirupa.com/t/removechild-and-loader-unload/265623>\
**Category:** flash\
**Created:** [July 10, 2008, 8:07pm UTC](https://forum.kirupa.com/t/removechild-and-loader-unload/265623 "2008-07-10T20:07:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsyapril88](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bsyapril88](https://forum.kirupa.com/u/bsyapril88)\
**Post date:** [July 10, 2008, 8:07pm UTC](https://forum.kirupa.com/t/removechild-and-loader-unload/265623/1 "2008-07-10T20:07:06Z")

</div>

I am loading external .swfs into a main .swf. Only one of the .swfs will be added to the stage and the main .swf will be removed using RemoveChild();.

Is it necessary to loader.unload all loaded external .swfs or does simply removing the child containing the loader do the work so everything that was loaded gets garbage collected?

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [July 10, 2008, 8:16pm UTC](https://forum.kirupa.com/t/removechild-and-loader-unload/265623/2 "2008-07-10T20:16:16Z")

</div>

What unload does is removes the content from the loader. If you remove the loader from its parent, assuming you have no other references to the loader whatsoever, then its pretty much doing the same thing. It wouldn’t hurt to use unload to be on the safe side.

---

<div class="post-metadata">

**Author:** ![bsyapril88](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bsyapril88](https://forum.kirupa.com/u/bsyapril88)\
**Post date:** [July 10, 2008, 9:21pm UTC](https://forum.kirupa.com/t/removechild-and-loader-unload/265623/3 "2008-07-10T21:21:34Z")

</div>

Thanks! That’s what I was thinking. Just wanted a second opinion.
