title: Does Entity manager needs to be closed every query?
body: <p>I'm about in 1 year developing systems in Java using JPA as database framework. <br />
  <br />
  Every time I query, I do not close the EntityManager, IMO understanding is that JPA automatically closes <strong>EntityManager</strong> after executing the query like</p>
  
  <blockquote>
    <p><em>getSingleResult()</em> or <em>getResultList()</em></p>
  </blockquote>
  
  <p>If not then does garbage collection will collect it to dispose?</p>