title: Angular 2: Dynamic component's Event Emitter subscription, need to unsubscribe?
body: <p>I am creating a <code>component</code> dynamically and subscribing to one of its <code>@Ouput</code> <code>EventEmitter</code>. </p>
  
  <p>The relevant code:</p>
  
  <p>Dynamic Component:</p>
  
  <pre><code> export class DynamicComponent implements OnInit {
      @Output() results: EventEmitter&lt;any&gt; = new EventEmitter&lt;any&gt;();
   ...
   }
  </code></pre>
  
  <p>Parent Component:</p>
  
  <pre><code> private loadDynamicComponent(): void {
     const componentFactory = this.factoryResolver.resolveComponentFactory(DynamicComponent);
     const componentRef = this.host.viewContainerRef.createComponent(componentFactory);
  
     (&lt;DynamicComponent&gt;componentRef.instance).results.subscribe(result =&gt; {
         this.result = result;
     })
   }
  </code></pre>
  
  <p>I am confused about whether or not I need to <code>unsubscribe</code> or will <code>Angular</code> clean this up?</p>