title: Angular CDK Overlay - What is the difference between dispose and detach?
body: <p>I created a tooltip that appears on hover using Angular Material CDK Overlay, but my performance was affected badly and it made my app really slow. After some research I realized that I need to clear the overlayRef each time  when closing the tooltip by using either dispose or detach.</p>
  <p>Now, I'm trying to understand the difference between the two functions. According to angular material documentation they are defined as follows:</p>
  <p>dispose - Cleans up the overlay from the DOM.</p>
  <p>detach - Detaches an overlay from a portal.</p>
  <p>When I tried using each of them I saw the same result so not sure which one I should use when.</p>