title: AEM ResourceResolver closure?
body: <p>I am using Sling ResourceResolver in my AEM code using two ways.</p>
  
  <ol>
  <li><p>Getting it using ResourceResolverFactory.</p>
  
  <p>@Reference<br>
   ResourceResolverFactory factory;<br>
  ResourceResolver resolver = factory.getResourceResolver();</p></li>
  </ol>
  
  <p>I use this ResourceResolver in finally block.</p>
  
  <pre><code>finally{
  resolver.close();}
  </code></pre>
  
  <ol start="2">
  <li><p>Getting it using SlingHttpServletRequest</p>
  
  <p>ResourceResolver resolver = request.getResourceResolver();</p></li>
  </ol>
  
  <p>My question is do i need to close ResourceResolver obtained from SlingHttpServletRequest or as request terminates, it ResourceResolver will also be closed?</p>