internal static void TrimApplicationInstances(bool removeAll = false)
 {
     if (_theApplicationFactory != null)
     {
         if (removeAll)
         {
             // Remove all pooled HttpApplication instances (potentially reclaiming memory eagerly)
             DisposeHttpApplicationInstances(_theApplicationFactory._freeList, _theApplicationFactory._freeList.Count);
         }
         else
         {
             // Remove only some pooled HttpApplication instances
             _theApplicationFactory.TrimApplicationInstanceFreeList();
         }
     }
 }