title: Forcing SWF to free allocated memory from codes on FLA timeline
body: <p>I have a Flash project and I have written some codes in timeline.  When I load SWF file and unload it the allocated memory is still there and memory leak happening every time I load and unload it. </p>
  
  <p>Is there a solution for it? </p>
  
  <p>I have tried this but the memory is not free.</p>
  
  <pre><code>addEventListener(Event.REMOVED_FROM_STAGE, removed);
  
  public function removed(evt:Event) {
      removeEventListener(Event.REMOVED_FROM_STAGE, removed);
      csc = null;
      if (currentFrame == 2) {
          content.removelisteners3()
          try {
              content.removeChildren();
          } catch (e:Error) {
          }
          menu.removeListeners1();
  
          try {
              mc1.mc.removeChildren();
          } catch (e:Error) {
          }
          try {
              mc1.removeChildren();
          } catch (e:Error) {
          }
      }
  
      if (currentFrame == 3) {
          menu.removeListeners2()
          try {
              search_ctn.removeChildren()
          } catch (e:Error) {
          }
          try {
              min_search.removeEventListener(MouseEvent.MOUSE_UP, f_min_search);
          } catch (e:Error) {
          }
          try {
              clos_search.removeEventListener(MouseEvent.MOUSE_UP, f_clos_search);
          } catch (e:Error) {
          }
          try {
              btnUpSearch.removeEventListener(MouseEvent.MOUSE_DOWN, f_btnUpSearch);
          } catch (e:Error) {
          }
  
      }
      try {
          this.removeChildren();
      } catch (e:Error) {
      }
  }
  </code></pre>