code: public static void releaseFactories() throws FacesException {
          synchronized(FACTORIES_CACHE) {
  
              if (!FACTORIES_CACHE.applicationMap.isEmpty()) {
  
                  FactoryFinderInstance fm = FACTORIES_CACHE.getApplicationFactoryManager();
                  fm.releaseFactories();
              }
  
              FACTORIES_CACHE.removeApplicationFactoryManager();
          }
      }
docs: <p><span class="changed_modified_2_0">Release</span> any
  references to factory instances associated with the class loader
  for the calling web application.  <span
  class="changed_modified_2_0">This method must be called during of
  web application shutdown.</span></p>
  
  @throws FacesException if the web application class loader
  cannot be identified