code: public void remove(EJSHome home)
      {
          List<BeanO> removedBeans = new ArrayList<BeanO>();
  
          // Clear out any entries eligible for garbage collection and then
          // loop through the remaining entries, looking for values that belong
          // to the specified home and remove them.  This will hold the cache
          // lock for longer than normal, but it is not expected that
          // applications will be stopped very often.
          synchronized (ivCache)
          {
              poll();
  
              for (Iterator<Map.Entry<WeakReference<EJSWrapperBase>, BeanO>> it = ivCache.entrySet().iterator(); it.hasNext();)
              {
                  BeanO bean = it.next().getValue();
  
                  if (bean.home == home)
                  {
                      it.remove(); // d730739
                      removedBeans.add(bean);
                  }
              }
          }
  
          // Now that the cache lock has been dropped, go ahead and destroy
          // all of the beans that were removed.
          for (BeanO bean : removedBeans)
          {
              bean.destroy();
          }
      }
docs: Removes all entries from the cache for the specified home and
  destroys them (i.e. PreDestroy is called).